Liking cljdoc? Tell your friends :D

fr33m0nk.utility


fn->functionclj

(fn->function f exception-handler)
(fn->function f exception-handler flat-map?)

takes a clojure fn for mapping and returns a java.util.function.Function instance Multi arity versions also take an exception handler. This can be a logger as well. If logger is a macro e.g. clojure.tools.logging, create logger-fn using utils/macro->fn and supply that as argument e.g. (def logger-fn (macro->fn clojure.tools.logging/info)) The reason is Clojure functions can't take macros as argument

takes a clojure fn for mapping and returns a java.util.function.Function instance
Multi arity versions also take an exception handler. This can be a logger as well.
If logger is a macro e.g. clojure.tools.logging, create logger-fn using utils/macro->fn and supply that as argument
e.g. (def logger-fn (macro->fn clojure.tools.logging/info))
The reason is Clojure functions can't take macros as argument
sourceraw docstring

fn->predicateclj

(fn->predicate f exception-handler)

Takes a clojure predicate fn and returns a java.util.function.Predicate instance Multi arity versions also take an exception handler. This can be a logger as well. If logger is a macro e.g. clojure.tools.logging, create logger-fn using utils/macro->fn and supply that as argument e.g. (def logger-fn (macro->fn clojure.tools.logging/info)) The reason is Clojure functions can't take macros as argument

Takes a clojure predicate fn and returns a java.util.function.Predicate instance
Multi arity versions also take an exception handler. This can be a logger as well.
If logger is a macro e.g. clojure.tools.logging, create logger-fn using utils/macro->fn and supply that as argument
e.g. (def logger-fn (macro->fn clojure.tools.logging/info))
The reason is Clojure functions can't take macros as argument
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close