package batteries

  1. Overview
  2. Docs
A community-maintained standard library extension

Install

Dune Dependency

Authors

Maintainers

Sources

v3.3.0.tar.gz
sha256=40d18485911e343500a5636bbf1d84e2ee32f924fe87e5fd13a37641a4d8f226
md5=fe4da12b678a82faaeda4e58492ea871

doc/batteries.unthreaded/BatResult/Monad/index.html

Module BatResult.Monad

val bind : ('a, 'e) t -> ('a -> ('c, 'e) t) -> ('c, 'e) t

Monadic composition.

bind r f proceeds as f x if r is Ok x, or returns r if r is an error.

  • since 2.0
val (>>=) : ('a, 'e) t -> ('a -> ('c, 'e) t) -> ('c, 'e) t

as bind

val return : 'a -> ('a, _) t

Monadic return, just encapsulates the given value with Ok

OCaml

Innovation. Community. Security.