Liking cljdoc? Tell your friends :D

blancas.morph.core

The core Morph library.

The core Morph library.
raw docstring

<$clj

(<$ value functor)

Maps a functor to the same value.

Maps a functor to the same value.
sourceraw docstring

<*>clj

(<*> af f & more)

Applies the receiver to the rest of the arguments. Unlike (app), this function takes a variable number of arguments.

Applies the receiver to the rest of the arguments. Unlike (app),
this function takes a variable number of arguments.
sourceraw docstring

<<clj

(<< p q)
(<< p q & more)

Performs two or more actions; keeps the result of the first.

Performs two or more actions; keeps the result of the first.
sourceraw docstring

>>clj

(>> m k)
(>> m k & more)

Performs two or more actions; ignores the result of the first.

Performs two or more actions; ignores the result of the first.
sourceraw docstring

allclj

(all s)

Accessor for the All type.

Accessor for the All type.
sourceraw docstring

all-idclj

The identity value for the All monoid.

The identity value for the All monoid.
sourceraw docstring

anyclj

(any s)

Accessor for the Any type.

Accessor for the Any type.
sourceraw docstring

any-idclj

The identity value for the Any monoid.

The identity value for the Any monoid.
sourceraw docstring

Applicativecljprotocol

A functor with application, providing operations to embed pure expressions and sequence computations to combine their results.

A functor with application, providing operations to embed pure
expressions and sequence computations to combine their results.

appclj

(app this x)

Applies the first functor on its argument, which is either a single value of a collection.

Applies the first functor on its argument, which is either
a single value of a collection.
sourceraw docstring

currycljmacro

(curry f)
(curry f n)

Returns a curried version of a function. Variadic functions must supplied the number of arguments.

Returns a curried version of a function. Variadic functions
must supplied the number of arguments.
sourceraw docstring

defcurrycljmacro

(defcurry fname & [f1 & fs :as all])

Defines a curried function that may be called as a partial or total function using the regular function-call notation. Partial applications yield functions that work the same way. When all arguments have been given it evaluates the body and returns its value. Takes an optional docstring, as defn.

Defines a curried function that may be called as a partial
or total function using the regular function-call notation.
Partial applications yield functions that work the same way.
When all arguments have been given it evaluates the body
and returns its value. Takes an optional docstring, as defn.
sourceraw docstring

empty-array-mapclj

source

empty-hash-mapclj

source

empty-hash-setclj

source

empty-listclj

source

empty-queueclj

source

empty-sorted-mapclj

source

empty-sorted-setclj

source

empty-stringclj

source

empty-vectorclj

source

flipclj

(flip f)

Returns a version of f with its first two arguments reversed.

Returns a version of f with its first two arguments reversed.
sourceraw docstring

fmapclj

(fmap function functor)

A version of (fun) where the functor is last.

A version of (fun) where the functor is last.
sourceraw docstring

fstclj

(fst p)

Accessor for the first element of a pair.

Accessor for the first element of a pair.
sourceraw docstring

Functorcljprotocol

The Functor protocol is used for types that can be mapped over. Instances of Functor should satisfy the following laws:

fmap id == id fmap (f . g) == fmap f . fmap g

The Functor protocol is used for types that can be mapped over.
Instances of Functor should satisfy the following laws:

fmap id  ==  id
fmap (f . g)  ==  fmap f . fmap g

funclj

(fun this f)

Applies a function to a functor's data, producing a new functor.

Applies a function to a functor's data, producing a new functor.
sourceraw docstring

liftmclj

(liftm f m)

Lifts a one-arg function to work with monads.

Lifts a one-arg function to work with monads.
sourceraw docstring

liftm2clj

(liftm2 f m1 m2)

Lifts a two-arg function to work with monads.

Lifts a two-arg function to work with monads.
sourceraw docstring

liftm3clj

(liftm3 f m1 m2 m3)

Lifts a three-arg function to work with monads.

Lifts a three-arg function to work with monads.
sourceraw docstring

liftm4clj

(liftm4 f m1 m2 m3 m4)

Lifts a four-arg function to work with monads.

Lifts a four-arg function to work with monads.
sourceraw docstring

mapmclj

(mapm f coll)

Maps a one-arg monad constructor over a collection of values. Then it executes the actions in a sequence with (seqm).

Maps a one-arg monad constructor over a collection of values.
Then it executes the actions in a sequence with (seqm).
sourceraw docstring

mcfcljmacro

(mcf args & body)

Makes a curried function off the arglist and body.

Makes a curried function off the arglist and body.
sourceraw docstring

mconcatclj

(mconcat coll)

Reduces the collection of monoids using their defined mappend for accumulation and mempty as initial value.

Reduces the collection of monoids using their defined
mappend for accumulation and mempty as initial value.
sourceraw docstring

monadcljmacro

(monad [& bindings] & body)

Monadic binding that expands into nested >>= forms and a function body.

The pattern:

(>>= p1 (fn [v1] (>>= p2 (fn [v2] ... (return (f v1 v2 ...))))))

can be more conveniently be written as:

(monad [v1 p1 v2 p2 ...] (return (f v1 v2 ...)))

Monadic binding that expands into nested >>= forms and a function body.

The pattern:

(>>= p1 (fn [v1]
(>>= p2 (fn [v2]
...
  (return (f v1 v2 ...))))))

can be more conveniently be written as:

(monad [v1 p1 v2 p2 ...] (return (f v1 v2 ...)))
sourceraw docstring

Monadcljprotocol

A monadic type supports the chaining of sequential actions.

A monadic type supports the chaining of sequential actions.

>>=clj

(>>= m k)

Performs computation m and applies k to the result. Function k must return a monadic type.

Performs computation m and applies k to the result. Function k
must return a monadic type.

returnclj

(return this x)

Creates a monadic value of type this with value x. The receiver object is not used except for dispatching the right constructor.

Creates a monadic value of type this with value x. The receiver
object is not used except for dispatching the right constructor.
sourceraw docstring

MonadPluscljprotocol

Monads that support choice and failure; should satisfy:

mzero >>= f = mzero v >> mzero = mzero

Monads that support choice and failure; should satisfy:

mzero >>= f  =  mzero
v >> mzero   =  mzero

mplusclj

(mplus this m)

An associative operation with identity value mzero.

An associative operation with identity value mzero.

mzeroclj

(mzero this)

Creates an identity value of type this with value x. The receiver is used to dispatch the right constructor.

Creates an identity value of type this with value x.
The receiver is used to dispatch the right constructor.
sourceraw docstring

Monoidcljprotocol

Monoids have an associative binary operator with an identity value.

Monoids have an associative binary operator with an identity value.

mappendclj

(mappend this x)

Applies the operator defined by the instance on this and x.

Applies the operator defined by the instance on this and x.

memptyclj

(mempty this)

Returns the identity value of the receiver. Though this is actually a constructor, implementing this function makes it possible to write generic functions over monoids.

Returns the identity value of the receiver. Though this is actually
a constructor, implementing this function makes it possible to write
generic functions over monoids.
sourceraw docstring

prod-idclj

The identity value for the Product monoid.

The identity value for the Product monoid.
sourceraw docstring

productclj

(product s)

Accessor for a Product type.

Accessor for a Product type.
sourceraw docstring

seqmclj

(seqm coll)

Executes actions in sequence; collects the results in a vector. The result is a new monad with the vector as its value. The collection argument must not be empty.

Executes actions in sequence; collects the results in a vector.
The result is a new monad with the vector as its value. The
collection argument must not be empty.
sourceraw docstring

seqm_clj

(seqm_ ms)

Executes actions in sequence, ignoring the results. The result is a new monad with an empty vector as its value.

Executes actions in sequence, ignoring the results.
The result is a new monad with an empty vector as its value.
sourceraw docstring

sndclj

(snd p)

Accessor for the second element of a pair.

Accessor for the second element of a pair.
sourceraw docstring

sumclj

(sum s)

Accessor for a Sum type.

Accessor for a Sum type.
sourceraw docstring

sum-idclj

The identity value for the Sum monoid.

The identity value for the Sum monoid.
sourceraw docstring

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

× close