Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec mem value (xs : int list) =
- match xs with
- | [] -> false
- | x::xs when x = value -> true
- | x::xs -> mem value xs
- let rec union list1 list2 =
- match list2 with
- | [] -> list1
- | x::xs when mem x list1 -> union list1 xs
- | x::xs -> (union list1 xs) @ [x]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement