(fold-m f acc xs)Analogous to reduce, except the result of f is in a monad: f is a -> b -> m a.
Analogous to reduce, except the result of f is in a monad: f is a -> b -> m a.
(guard p)If p is truthy, return (return nil), otherwise mzero, halting the current computation.
If p is truthy, return (return nil), otherwise mzero, halting the current computation.
(lift-m-2 f)(lift-m-2 f m1)(lift-m-2 f m1 m2)As lift-m but for binary functions: transforms a -> b -> c into m a -> m b -> m c. Likewise for lift-m-3, etc.
As lift-m but for binary functions: transforms a -> b -> c into m a -> m b -> m c. Likewise for lift-m-3, etc.
(lift-m-4 f)(lift-m-4 f m-1)(lift-m-4 f m-1 m-2)(lift-m-4 f m-1 m-2 m-3)(lift-m-4 f m-1 m-2 m-3 m-4)(lift-m-5 f)(lift-m-5 f m-1)(lift-m-5 f m-1 m-2)(lift-m-5 f m-1 m-2 m-3)(lift-m-5 f m-1 m-2 m-3 m-4)(lift-m-5 f m-1 m-2 m-3 m-4 m-5)(lift-m-6 f)(lift-m-6 f m-1)(lift-m-6 f m-1 m-2)(lift-m-6 f m-1 m-2 m-3)(lift-m-6 f m-1 m-2 m-3 m-4)(lift-m-6 f m-1 m-2 m-3 m-4 m-5)(lift-m-6 f m-1 m-2 m-3 m-4 m-5 m-6)(lift-m-7 f)(lift-m-7 f m-1)(lift-m-7 f m-1 m-2)(lift-m-7 f m-1 m-2 m-3)(lift-m-7 f m-1 m-2 m-3 m-4)(lift-m-7 f m-1 m-2 m-3 m-4 m-5)(lift-m-7 f m-1 m-2 m-3 m-4 m-5 m-6)(lift-m-7 f m-1 m-2 m-3 m-4 m-5 m-6 m-7)(lift-m-8 f)(lift-m-8 f m-1)(lift-m-8 f m-1 m-2)(lift-m-8 f m-1 m-2 m-3)(lift-m-8 f m-1 m-2 m-3 m-4)(lift-m-8 f m-1 m-2 m-3 m-4 m-5)(lift-m-8 f m-1 m-2 m-3 m-4 m-5 m-6)(lift-m-8 f m-1 m-2 m-3 m-4 m-5 m-6 m-7)(lift-m-8 f m-1 m-2 m-3 m-4 m-5 m-6 m-7 m-8)(msum addends)Add all the addends together using mplus.
Add all the addends together using mplus.
(mwhen p acc)Execute the computation acc if p is truthy.
Execute the computation acc if p is truthy.
(sequence-m ms)Transform a sequence of monadic values [m a] into a monadic value which is a sequence, m [a].
Transform a sequence of monadic values [m a] into a monadic value which is a sequence, m [a].
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |