sidekick/util/either.ml
2014-12-15 17:09:01 +01:00

11 lines
201 B
OCaml

type ('a, 'b) t =
| Left of 'a
| Right of 'b
let mk_left a = Left a
let mk_right b = Right b
let destruct e f_left f_right = match e with
| Left a -> f_left a
| Right b -> f_right b