package orsetto

  1. Overview
  2. Docs
A library of assorted structured data interchange languages

Install

dune-project
 Dependency

Authors

Maintainers

Sources

r1.0.2.tar.gz
sha256=bb2af4d8b376b2d60fa996bd4d3b90d9f3559455672540f6d7c3598af81d483b
md5=f7bfa83013801b42fcdba607af2f012b

doc/orsetto.cf/Cf_decode/Monad/index.html

Module Cf_decode.Monad

Use this monad to compose decoding schemes where intermediate values scanned earlier in the octet stream are used to select decoding schemes for the values scanned later in the stream.

type 'r t = 'r scheme

The abstract type of a monad.

Module inclusions from Cf_monad_core and Cf_seqmonad.

include Cf_monad.Core.Unary.Profile with type 'r t := 'r t
val return : 'r -> 'r t

Use return a to apply the binding to a.

val bind : 'a t -> ('a -> 'b t) -> 'b t

Use bind m f to bind f to the value returned by m.

val map : 'a t -> f:('a -> 'b) -> 'b t

Use map m f to return the result of applying f to the value returned by m.

module Infix : Cf_monad_core.Unary.Infix with type 'r t := 'r t

Open Infix to include the infix monad operators.

val disregard : 'r t -> unit t

Use disregard m to ignore the value returned by m and apply the unit value to the bound function.

include Cf_seqmonad.Functor.Unary with type 'r t := 'r t
val collect : 'r t Seq.t -> (int * 'r list) 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 serial : unit t Seq.t -> unit t

Use serial s to bind in sequence every monad value in the sequence s.

OCaml

Innovation. Community. Security.