Misc.Stdlib.Option(3)

πŸ’… Misc.Stdlib.Option(3) β€” OCaml library manual πŸ’…

okay bestie, welcome to the Misc.Stdlib.Option(3) page from the OCaml library manual. This is the little corner where Option gets some extra sparkle. ✨


πŸŽ€ NAME πŸŽ€

Misc.Stdlib.Option β€” Extensions to the Option module πŸ’–


🧚 MODULE 🧚

Module Misc.Stdlib.Option


πŸ’– DOCUMENTATION πŸ’–

Here's the module situation, no cap:

Module Option
 : sig end

🌈 Extensions to the Option module 🌈

The type is literally:

type 'a t = 'a option

And there's one value, print, with this exact signature:

val print : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t
       -> unit

So yeah: print wants a printer function shaped like (Format.formatter -> 'a -> unit), then a Format.formatter, then an 'a t, and it hands back unit. That's the whole menu, bestie. 🫢


✨ Cute sign-off: this page comes from OCamldoc, dated 2026-06-22, and it's the Misc.Stdlib.Option(3) manual page in the OCaml library manual. Bye bestie, go slay some option values! πŸ’…πŸŽ€
πŸ“¦ where this page comes from