summaryrefslogtreecommitdiff
path: root/lib/ocaml_rts/linksem/src_lem_library/either.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ocaml_rts/linksem/src_lem_library/either.ml')
-rw-r--r--lib/ocaml_rts/linksem/src_lem_library/either.ml24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/ocaml_rts/linksem/src_lem_library/either.ml b/lib/ocaml_rts/linksem/src_lem_library/either.ml
deleted file mode 100644
index ddf1b214..00000000
--- a/lib/ocaml_rts/linksem/src_lem_library/either.ml
+++ /dev/null
@@ -1,24 +0,0 @@
-type ('a, 'b) either =
- | Left of 'a
- | Right of 'b
-
-let either_case fa fb x = match x with
- | (Left a) -> fa a
- | (Right b) -> fb b
-
-let eitherEqualBy eql eqr (left: ('a, 'b) either) (right: ('a, 'b) either) =
- match (left, right) with
- | ((Left l), (Left l')) -> eql l l'
- | ((Right r), (Right r')) -> eqr r r'
- | _ -> false
-
-let rec either_partition l = ((match l with
- | [] -> ([], [])
- | x :: xs -> begin
- let (ll, rl) = (either_partition xs) in
- (match x with
- | (Left l) -> ((l::ll), rl)
- | (Right r) -> (ll, (r::rl))
- )
- end
-))