Liking cljdoc? Tell your friends :D

weaving.core


%|clj/smacro

(%| & expr)

*|clj/s

(*| f & more-fns)

Equivalent to juxt.

Equivalent to `juxt`.
raw docstring

->|clj/s

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

<-|clj/s

(<-| v)

Equivalent to constantly.

Equivalent to `constantly`.
raw docstring

=|clj/s

(=| & args)

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

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

and|clj/s

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

apply|clj/s

(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

args|clj/s

(args| f & fs)

callclj/s

(call f & args)

Calls function f by applying args.

Calls function `f` by applying `args`.
raw docstring

each-arg|clj/s

(each-arg| f arg-f)

if|clj/s

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

in|clj/s

(in| path f & more)

Transforms a one-argument function f into a function receiving one collection and applying f to the value at the location denoted by path in this collection. Multiple path+function pairs can follow.

Transforms a one-argument function `f` into a function receiving
one collection and applying `f` to the value at the location
denoted by `path` in this collection.
Multiple path+function pairs can follow. 
raw docstring

juxtm|clj/s

(juxtm| m)
(juxtm| k v & {:as more-kvs})

Like juxt except that functions are passed as values of a map whose shape is used to return their results, under the same key. The map can be an explicit map (one argument) or a flat, implicit map (variadic arguments).

Like juxt except that functions are passed as values of a map whose shape
is used to return their results, under the same key.
The map can be an explicit map (one argument) or a flat, implicit map
(variadic arguments).
raw docstring

not|clj/s

Equivalent to complement.

Equivalent to `complement`.
raw docstring

or|clj/s

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

parse-intclj/s

(parse-int x)

tap|clj/s

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

unapply|clj/s

(unapply| f)

Transforms a function f accepting any number of arguments into a function working on these arguments as a list.

Transforms a function `f` accepting any number of arguments into a
function working on these arguments as a list.
raw docstring

when|clj/s

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

|clj/s

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

||clj/s

(|| f & args)

Returns a function that behaves like partial.

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

ø|clj/s

(ø| 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/s

(ø|| 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

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

× close