Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
Require Import Basics.Overture.Require Import Basics.Overture.(** * Option types *)(** Option types are a simple way to represent a value that may or may not be present. They are also known as the Maybe monad in functional programming. *)(** [option] is functorial. *)Definitionfunctor_option {AB} (f : A -> B) (x : option A) : option B :=
match x with
| None => None
| Some a => Some (f a)
end.(** The [Some] constructor is injective. *)