Returns the data type of an fn literal
2 answers
Anonymous function macro #
expands into a form fn
eg.
#([1 2])
decomposes into (fn* [] ([1 2]))
as you can see, when it is called, the vector you are trying to return will be called as a function which will not work as no arguments will be provided. This is the same problem you have:
#([(take % (range))])
decomposes into
(fn* [x] ([(take x (range))]))
+4
source to share