package orsetto
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e260412b2dd0f98cfe3dc7ed5c31a694eb31c93cd207c51fa12675b790234ee0ad3bf07d9be17a4dc266fedfe55b14c967cad7bc0c9414063eef8afd59f3d0d1
doc/orsetto.cf/Cf_seqmonad/index.html
Module Cf_seqmonad
Monad functions for functional progressive sequences.
Overview
This module augments the core monad interfaces with functions that facilitate monad functions that operate on sequences of monad values. It also provides a distinguished monad that encapsulates a sequence.
module Functor : sig ... endSequence Monad
Module inclusions
module Basis : Cf_monad_core.Binary.Basis with type ('m, 'r) t := ('m, 'r) tinclude Cf_monad_core.Binary.Profile with type ('m, 'r) t := ('m, 'r) t
val return : 'r -> ('m, 'r) tUse return a to apply the binding to a.
Use bind m f to bind f to the value returned by m.
Use map m ~f to return the result of applying f to the value returned by m.
Use product a b to return the monoidal product of a and b.
module Affix : Cf_monad_core.Binary.Affix with type ('m, 'r) t := ('m, 'r) tOpen Affix to include the affix monad operators.
Use disregard m to ignore the value returned by m and apply the unit value to the bound function.
module Infix = AffixDeprecated module alias.
include Functor.Binary with type ('m, 'r) t := ('m, 'r) t
Use collect s to bind in sequence every monad value in the finite sequence s and collect all the returned values. Returns (n, s) where n is the number of values collected and s is the list of values in reverse order, i.e. from last collected to first collected. Never returns and exhausts all memory if s never terminates.
val one : 'm -> ('m, unit) tUse one v to produce the value v in the encapsulated sequence.
Use all s to produce each value consumed from s in the encapsulated sequence.