Liking cljdoc? Tell your friends :D

weaving.core


%|cljmacro

(%| & expr)
source

*|clj

(*| f & more-fns)

Equivalent to juxt.

Equivalent to `juxt`.
sourceraw docstring

->|clj

(->| & 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.
sourceraw docstring

<-|clj

(<-| v)

Equivalent to constantly.

Equivalent to `constantly`.
sourceraw docstring

=|clj

(=| & args)

Returns a function (g x) that returns (= x v).

Returns a function `(g x)` that returns `(= x v)`.
sourceraw docstring

and|clj

(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`.
sourceraw docstring

apply|clj

(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`.
sourceraw docstring

context|clj

(context| f)
source

if|clj

(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).
sourceraw docstring

not|clj

Equivalent to complement.

Equivalent to `complement`.
sourceraw docstring

or|clj

(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`.
sourceraw docstring

tap|clj

(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.
sourceraw docstring

warp|clj

(warp| weaver warper)
source

when|clj

(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.
sourceraw docstring

|clj

(| 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.
sourceraw docstring

||clj

(|| f & args)

Returns a function that behaves like partial.

Returns a function that behaves like `partial`.
sourceraw docstring

ø|clj

(ø| 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`.
sourceraw docstring

ø||clj

(ø|| 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`.
sourceraw docstring

•|clj

(•| 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.
sourceraw docstring

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

× close