Liking cljdoc? Tell your friends :D

weaving.core


*|clj

(*| f & more-fns)

Returns a function that behaves like juxt but preserves arity.

Returns a function that behaves like `juxt` but preserves arity.
raw docstring

->|clj

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

<-|clj

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

?|clj

(?| & args)

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

Returns a function `(g x)` that returns `(= x v)`.
raw 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. 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.
raw 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`.
raw docstring

arity-compclj

(arity-comp)
(arity-comp f)
(arity-comp f & more-fns)

Composes functions like comp but preserves arity.

Composes functions like `comp` but preserves arity.
raw docstring

context|clj

(context| f)

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

not|clj

(not| f)

Returns a function that behaves like complement but preserves arity.

Returns a function that behaves like `complement` but preserves
arity.
raw 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. 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.
raw docstring

tap|clj

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

warp|clj

(warp| weaver warper)

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. 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.
raw docstring

|clj

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

||clj

(|| f & args)

Returns a function that behaves like partial but preserves arity.

Returns a function that behaves like `partial` but preserves arity.
raw 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`.
raw 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`.
raw docstring

•|clj

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

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

× close