home
/
code
/
tiger.ml.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
8eee986f27ba22921f8320c04f0406e7a7c66be2
[tiger.ml.git]
/
tiger_opt.ml
1
type 'a t = 'a option
2
3
let map t f =
4
match t with
5
| None -> None
6
| Some x -> Some (f x)
7
8
let iter t ~f =
9
ignore (map t f)
10
11
let get t ~default =
12
match t with
13
| None -> default
14
| Some x -> x
This page took
0.057524 seconds
and
3
git commands to generate.