1 2 3 4 5 6 7 8 9
let withDefault default opt = match opt with | Some v -> v | None -> default let map f opt = match opt with | Some v -> Some (f v) | None -> None