In the current text of clojure.java.api
, there is an text explaining that IFn
can be passed to HOF.
Then an example is presented as "passing plus
to read
" but I think the example is actually passing inc
to map
.
This is the current text:
IFns can be passed to higher order functions, e.g. the example below passes plus to read:
IFn map = Clojure.var("clojure.core", "map");
IFn inc = Clojure.var("clojure.core", "inc");
map.invoke(inc, Clojure.read("[1 2 3]"));