Created
January 20, 2014 17:01
-
-
Save hcarty/8524021 to your computer and use it in GitHub Desktop.
BatSet infix operator possibilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* In the context of BatSet and BatSet.Make *) | |
module Infix = struct | |
let ( <-- ) s x = add x s | |
let ( < ) a b = not (equal a b) && subset a b | |
let ( > ) b a = not (equal a b) && subset a b | |
let ( <= ) a b = subset a b | |
let ( >= ) b a = subset a b | |
let ( - ) a b = diff a b | |
let ( ^ ) a b = union a b | |
let ( & ) a b = inter a b | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment