Clojure Linear Algebra Refresher – Matrix Transformations
dragan.rocks
dragan.rocks
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...
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/> and I don't even program in Clojure
Congrats, you just did! :)