Liking cljdoc? Tell your friends :D

imminent.util.monad


mfilterclj

(mfilter ctx pred? vs)

ctx is the monadic context. pred? is a function that receives a v from vs and returns a monad that yields a boolean vs is a list of values

It filters vs and returns a monad that yields a list of the values matching pred?. Generalises standard filter to monads.

`ctx` is the monadic context.
`pred?` is a function that receives a `v` from `vs` and returns a monad that yields a boolean
`vs` is a list of values

It filters `vs` and returns a monad that yields a list of the values matching `pred?`. Generalises standard `filter` to monads.
sourceraw docstring

mjoinclj

(mjoin mm)

Takes a nested monad mm and removes one monadic level by carrying out the outer context, returning its inner monad

Takes a nested monad `mm` and removes one monadic level by carrying out the outer context, returning its inner monad
sourceraw docstring

mliftclj

(mlift ctx f)

ctx is the monadic context. Lifts a n-ary function f into a monadic context

`ctx` is the monadic context.
Lifts a n-ary function `f` into a monadic context
sourceraw docstring

mlift2clj

(mlift2 f)

Lifts a binary function f into a monadic context

Lifts a binary function `f` into a monadic context
sourceraw docstring

mmapclj

(mmap ctx f vs)

ctx is the monadic context. Given a monad m, a function f and a list of values vs, it maps f over vs finally sequencing all resulting monads. See msequence

`ctx` is the monadic context.
Given a monad `m`, a function `f` and a list of values `vs`, it maps `f` over `vs` finally sequencing all resulting monads. See `msequence`
sourceraw docstring

msequenceclj

(msequence ctx ms)

ctx is the monadic context. Given a monad m and a list of monads ms, it returns a single monad containing a list of the values yielded by all monads in ms

`ctx` is the monadic context.
Given a monad `m` and a list of monads `ms`, it returns a single monad containing a list of
the values yielded by all monads in `ms`
sourceraw docstring

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

× close