Option.Syntax(3)
β¨ NAME β¨
okay so this is Option.Syntax(3), straight out of the OCaml library. The name is Option.Syntax, and the one-line vibe is Binding operators. periodt.
π§© Module
Module Option.Syntax β that's the module this whole page is about, bestie. It's giving βsmall module, big syntax energy.β
π Documentation
Under Documentation you get Module Syntax with this sig:
Module Syntax
: sig end
That's the whole signature. No cap.
The page says: Binding operators. See manual section 12.23 for details.
Since 5.5 β yes, this cutie has been around since then. π¦
Here are the four binding operators, exactly as written:
val ( let* ) : 'a option -> ('a -> 'b option) -> 'b optionβ this one is literallyOption.bind. It's bind but make it syntax, slay.val ( and* ) : 'a option -> 'b option -> ('a * 'b) optionβ this one isOption.product. Pairing options up, iconic.val let+ : 'a option -> ('a -> 'b) -> 'b optionβ this one isOption.map. Mapping inside an option, main character energy.val and+ : 'a option -> 'b option -> ('a * 'b) optionβ this one isOption.producttoo. Same product moment, different operator. π
π signed, sealed, delivered by OCamldoc, dated 2026-06-22, for page Option.Syntax(3). bye bestie π
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms