Skip to content

Instantly share code, notes, and snippets.

@kunishi
Created January 29, 2014 10:21
Show Gist options
  • Save kunishi/8685200 to your computer and use it in GitHub Desktop.
Save kunishi/8685200 to your computer and use it in GitHub Desktop.
fun memq(x, nil) = false
| memq(x, y::ys) =
if x = y then true
else memq(x, ys);
fun subset(nil, ys) = true
| subset(x::xs, ys) =
if memq(x, ys) = false
then false
else subset(xs, ys);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment