I have a function which takes a function and a number and returns the application of the function on the number, and a cube 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 #(Math/sin %) 3.14)
What is the explanation?