Skip to content

Commit 0833256

Browse files
Merge pull request #120 from OwenConoly/master
add option_map2
2 parents c1caa08 + 85e5db1 commit 0833256

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/coqutil/Datatypes/Option.v

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Scheme Equality for option.
22
Arguments option_beq {_} _ _ _.
33

4+
Definition option_map2 {X Y Z : Type} (f : X -> Y -> Z) x y :=
5+
match x, y with
6+
| Some x, Some y => Some (f x y)
7+
| _, _ => None
8+
end.
9+
410
Definition option_relation {A B} R (x : option A) (y : option B) :=
511
match x with
612
| None => y = None

0 commit comments

Comments
 (0)