3 (Depends on lecture notes for safe division by zero.)
5 Write a function `lift'` that generalized the correspondence between +
6 and `add'`: that is, `lift'` takes any two-place operation on integers
7 and returns a version that takes arguments of type `int option`
8 instead, returning a result of `int option`. In other words, `lift'`
11 (int -> int -> int) -> (int option) -> (int option) -> (int option)
13 so that `lift' (+) (Some 3) (Some 4)` will evalute to `Some 7`.
14 Don't worry about why you need to put `+` inside of parentheses.
15 You should make use of `bind'` in your definition of `lift'`:
17 let bind' (u: int option) (f: int -> (int option)) =
18 match u with None -> None | Some x -> f x;;