(*| f & more-fns)
Returns a function that behaves like juxt
but preserves arity.
Returns a function that behaves like `juxt` but preserves arity.
(->| & fns)
Returns a function that behaves like comp
but composes functions
from left to right.
Preserves arity.
Returns a function that behaves like `comp` but composes functions from left to right. Preserves arity.
(<-| v)
Returns a function that behaves like constantly
but has 1 for
arity.
Returns a function that behaves like `constantly` but has 1 for arity.
(?| & 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
.
Preserves arity.
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`. Preserves arity.
(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`.
(arity-comp)
(arity-comp f)
(arity-comp f & more-fns)
Composes functions like comp
but preserves arity.
Composes functions like `comp` but preserves arity.
(context| 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 (defaults to nil
).
Preserves arity.
Returns a function that will run `f` when `pred` succeeds or otherwise run `else` if it is provided (defaults to `nil`). Preserves arity.
(not| f)
Returns a function that behaves like complement
but preserves
arity.
Returns a function that behaves like `complement` but preserves arity.
(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
.
Preserves arity.
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`. Preserves arity.
(tap|)
(tap| & fns)
Returns a function that calls fns
in order,
passing to each one its argument before returning it.
Preserves arity.
Returns a function that calls `fns` in order, passing to each one its argument before returning it. Preserves arity.
(warp| weaver warper)
(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.
Preserves arity.
Returns a function that will run the `fns` in order when `pred` succeeds or return the value that was passed in otherwise. Preserves arity.
(| f & args)
Returns a function that behaves like partial
except that new args
are added to the beginning of the parameter list rather than the end.
Preserves arity.
Returns a function that behaves like `partial` except that new args are added to the beginning of the parameter list rather than the end. Preserves arity.
(|| f & args)
Returns a function that behaves like partial
but preserves arity.
Returns a function that behaves like `partial` but preserves arity.
(ø| 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 whose arguments become calls to functions that will be passed the woven value.
Transforms a function whose arguments become calls to functions that will be passed the woven value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close