clojure.core/fnil¶
Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched.
Examples¶
See also¶
- clojure.core/partial (10)
- clojure.core/comp (15)
- clojure.core/juxt (7)
- clojure.core/or (2)
- clojure.core/some-fn (2)
Content from the matching ClojureDocs page, with authors credited on each contribution.