Option.Syntax(3)

πŸ“¦
version 5.5.0 Β· 2 versions
, in arch rolling

✨ 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 literally Option.bind. It's bind but make it syntax, slay.
  • val ( and* ) : 'a option -> 'b option -> ('a * 'b) option β€” this one is Option.product. Pairing options up, iconic.
  • val let+ : 'a option -> ('a -> 'b) -> 'b option β€” this one is Option.map. Mapping inside an option, main character energy.
  • val and+ : 'a option -> 'b option -> ('a * 'b) option β€” this one is Option.product too. 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