home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add option iter
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_opt.ml
diff --git
a/compiler/src/lib/tiger/tiger_opt.ml
b/compiler/src/lib/tiger/tiger_opt.ml
index
cdacd0e
..
8eee986
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_opt.ml
+++ b/
compiler/src/lib/tiger/tiger_opt.ml
@@
-5,6
+5,9
@@
let map t f =
| None -> None
| Some x -> Some (f x)
+let iter t ~f =
+ ignore (map t f)
+
let get t ~default =
match t with
| None -> default
This page took
0.022006 seconds
and
4
git commands to generate.