(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.
(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
(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
(mlift2 f)
Lifts a binary function f
into a monadic context
Lifts a binary function `f` into a monadic context
(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`
(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`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close