(->| & fns)
Returns a function that behaves like comp
but composes functions
from left to right.
Returns a function that behaves like `comp` but composes functions from left to right.
(=| & args)
Returns a function (g x)
that returns (= x v)
.
Returns a function `(g x)` that returns `(= x v)`.
(and|)
(and| f)
(and| f & more-fns)
Returns a function f
that runs fns
in order on the arguments of
f
in the style of and
, i.e. breaking out of the chain upon
false
or nil
.
Returns a function `f` that runs `fns` in order on the arguments of `f` in the style of `and`, i.e. breaking out of the chain upon `false` or `nil`.
(apply| f)
Transforms a function f
accepting one argument, presumably a
sequence, into a function that applies this argument to f
.
Transforms a function `f` accepting one argument, presumably a sequence, into a function that applies this argument to `f`.
(if| pred f)
(if| pred f else)
Returns a function that will run f
when pred
succeeds or
otherwise run else
if it is provided (returns the passed value
by default).
Returns a function that will run `f` when `pred` succeeds or otherwise run `else` if it is provided (returns the passed value by default).
(or|)
(or| f)
(or| f & more-fns)
Returns a function that runs fns
in order in the style of or
,
i.e. breaking out of the chain if one returns something different
than false
or nil
.
Returns a function that runs `fns` in order in the style of `or`, i.e. breaking out of the chain if one returns something different than `false` or `nil`.
(tap|)
(tap| & fns)
Returns a function that calls fns
in order,
passing to each one its argument before returning it.
Returns a function that calls `fns` in order, passing to each one its argument before returning it.
(when| pred & fns)
Returns a function that will run the fns
in order when pred
succeeds or return the value that was passed in otherwise.
Returns a function that will run the `fns` in order when `pred` succeeds or return the value that was passed in otherwise.
(| f & args)
Returns a function like the result of partial
except that new args
are added to the beginning of the parameter list rather than the end.
Returns a function like the result of `partial` except that new args are added to the beginning of the parameter list rather than the end.
(|| f & args)
Returns a function that behaves like partial
.
Returns a function that behaves like `partial`.
(ø| f)
Unpartialize the first argument of f
, i.e. returns a function
that will apply all but the first argument to f
.
Unpartialize the first argument of `f`, i.e. returns a function that will apply all but the first argument to `f`.
(ø|| f)
Unpartialize the last argument of f
, i.e. returns a function
that will apply all but the last argument to f
.
Unpartialize the last argument of `f`, i.e. returns a function that will apply all but the last argument to `f`.
(•| f & fs)
Transforms a function so that its arguments become functions that will be passed the woven value and are expected to return the argument's value.
Transforms a function so that its arguments become functions that will be passed the woven value and are expected to return the argument's value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close