Liking cljdoc? Tell your friends :D

com.michaelgaare.clj-util.functional

Functional programming utility functions

Functional programming utility functions
raw docstring

ajuxtclj

(ajuxt f)
(ajuxt f g)
(ajuxt f g h)
(ajuxt f g h & fs)

Like juxt combined with apply. Takes a set of functions, and returns a function of the same arity as the number of functions that will call each function with the arg that matches it positionally, and return a vector of the results.

((ajuxt a b) x y) => [(a x) (b y)]

Like juxt combined with apply. Takes a set of functions, and returns
a function of the same arity as the number of functions that will
call each function with the arg that matches it positionally, and
return a vector of the results.

((ajuxt a b) x y) => [(a x) (b y)]
raw docstring

cond-letcljmacro

(cond-let & clauses)

Like cond, but each test should be in the form of [binding test]. If test evaluates logical true, then the associated binding will be available in the corresponding expression.

Like cond, but each test should be in the form of [binding test]. If
test evaluates logical true, then the associated binding will be
available in the corresponding expression.
raw docstring

cond-let->cljmacro

(cond-let-> expr & clauses)

Like cond->, but each test should be in the form of [binding test]. If test evaluates logical true, then the associated binding will be available in the corresponding expression.

Like cond->, but each test should be in the form of [binding
test]. If test evaluates logical true, then the associated binding
will be available in the corresponding expression.
raw docstring

cond-let->>cljmacro

(cond-let->> expr & clauses)

Like cond->>, but each test should be in the form of [binding test]. If test evaluates logical true, then the associated binding will be available in the corresponding expression.

Like cond->>, but each test should be in the form of [binding
test]. If test evaluates logical true, then the associated binding
will be available in the corresponding expression.
raw docstring

cond-let-some->cljmacro

(cond-let-some-> expr & clauses)

Like cond-let->, but accepts false values in tests

Like cond-let->, but accepts false values in tests
raw docstring

get-in*cljmacro

(get-in* m ks)

Faster version of get-in as a macro. Does not support default value.

Faster version of get-in as a macro. Does not support default value.
raw docstring

get-valueclj

(get-value m key-or-path)
(get-value m key-or-path default)

Calls get, or get-in if key-or-path is a vector. Optional default.

Calls `get`, or `get-in` if key-or-path is a vector. Optional default.
raw docstring

pred-patternclj

(pred-pattern p1)
(pred-pattern p1 p2)
(pred-pattern p1 p2 p3)
(pred-pattern p1 p2 p3 & ps)

Takes variable number of preds, and returns a function that takes a collection and returns true if each of the preds matches the position in the collection. Eg:

((pred-pattern even? odd? nil?) [1 3 nil :ignored :ignored]) ;; => true

Takes variable number of preds, and returns a function that takes a
collection and returns true if each of the preds matches the
position in the collection. Eg:

((pred-pattern even? odd? nil?) [1 3 nil :ignored :ignored]) ;; => true
raw docstring

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

× close