containers
A modular, clean and powerful extension of the OCaml standard library
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package containers
-
containers
-
containers.bencode
-
containers.cbor
-
containers.codegen
-
containers.monomorphic
-
containers.top
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Alias to map
. p >|= f
parses an item x
using p
, and returns f x
.
Alias to bind
. p >>= f
results in a new parser which behaves as p
then, in case of success, applies f
to the result.
a <* b
parses a
into x
, parses b
and ignores its result, and returns x
.
a *> b
parses a
, then parses b
into x
, and returns x
. The result of a
is ignored.
Alias to or_
.
a <|> b
tries to parse a
, and if a
fails without consuming any input, backtracks and tries to parse b
, otherwise it fails as a
.
a <?> msg
behaves like a
, but if a
fails, a <?> msg
fails with msg
instead. Useful as the last choice in a series of <|>
. For example: a <|> b <|> c <?> "expected one of a, b, c"
.
ON THIS PAGE
No table of contents