Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ['a] union_set set1 set2 =
- let _ = if set1#superset <> set2#superset then
- failwith "The two sets given to union_set must be subsets of the same set."
- else () in
- object(self)
- inherit ['a] subset
- set1#superset
- (fun x -> (set1#contains x) || (set2#contains x))
- end
- ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement