Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Clojure Linear Algebra Refresher – Matrix Transformations (dragan.rocks)
52 points by emidln on June 13, 2017 | hide | past | favorite | 3 comments


1 point by dragandj 7 hours ago | parent [-] | on: Clojure Linear Algebra Refresher (3) – Matrix Tran...

This is part 3 of a series.

The first part can be found here: Clojure Linear Algebra Refresher (1) - Vector Spaces

http://dragan.rocks/articles/17/Clojure-Linear-Algebra-Refre...

The second part is here:

http://dragan.rocks/articles/17/Clojure-Linear-Algebra-Refre...


Am I missing something here or does the article open with a false statement:

   Consider a Clojure function (fn [x] (+ (* x x) 4)).
   The set of allowed values for x is called the domain
   of the function. For value 2, for example, the result
   is 16. We say that the image of 2 is 16.
As far as I can see the image of 2 is 8 for that function - and I don't even program in Clojure. A Clojure repl [1] agrees:

   >  (defn squaredplusfour[x] (+ (* x x) 4))
   #'sandbox11276/squaredplusfour
   > (squaredplusfour 2)
   8

 [1] http://www.tryclj.com/


Yep looks like a simple mistake.

> and I don't even program in Clojure

Congrats, you just did! :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: