Skip to content

Instantly share code, notes, and snippets.

@vaskaloidis
Created April 7, 2014 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaskaloidis/10016393 to your computer and use it in GitHub Desktop.
Save vaskaloidis/10016393 to your computer and use it in GitHub Desktop.
fun member(e, nil) = false
| member(e, h::t) =
if e = h then true
else member(e, t);
fun union(nil, c) = c
| union(a::b,c) =
if member(a, c) then union(b,c)
else a::union(b,c);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment