Skip to content

Module Option.Syntax

Binding operators. See manual section 12.23 for details.

since 5.5

ocaml
val (let*) : 'a option -> ('a -> 'b option) -> 'b option
reasonml
let (let*): option('a) => ('a => option('b)) => option('b);

( let* ) is Option.bind.

ocaml
val (and*) : 'a option -> 'b option -> ('a * 'b) option
reasonml
let (and*): option('a) => option('b) => option(('a, 'b));

( and* ) is Option.product.

ocaml
val (let+) : 'a option -> ('a -> 'b) -> 'b option
reasonml
let (let+): option('a) => ('a => 'b) => option('b);

( let+ ) is Option.map.

ocaml
val (and+) : 'a option -> 'b option -> ('a * 'b) option
reasonml
let (and+): option('a) => option('b) => option(('a, 'b));

( and+ ) is Option.product.