I have a function that takes a function and a number and returns a function application on a number and a cubic function:
(defn something [fn x]
(fn x))
(defn cube [x]
(* x x x))
When I call the function as follows, it works:
(something cube 4)
but this returns an error:
(something Math/sin 3.14)
However, this works:
(something
What is the explanation?
source
share