diff options
author | Adam Chlipala <adam@chlipala.net> | 2014-12-23 14:41:23 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2014-12-23 14:41:23 -0500 |
commit | d30a5ee04dd437f969fca7ad2b3faee7ed324562 (patch) | |
tree | faf593f9e7282d65f7d1740cc0188c4f3c2fde6c /lib/ur/list.ur | |
parent | 1c58ce1a627bedb4d57e64f429d09721c55de340 (diff) |
List.mem
Diffstat (limited to 'lib/ur/list.ur')
-rw-r--r-- | lib/ur/list.ur | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ur/list.ur b/lib/ur/list.ur index cbb4faf2..11895884 100644 --- a/lib/ur/list.ur +++ b/lib/ur/list.ur @@ -216,6 +216,16 @@ fun foldlMap [a] [b] [c] f = fold [] end +fun mem [a] (_ : eq a) (x : a) = + let + fun mm ls = + case ls of + [] => False + | y :: ls => y = x || mm ls + in + mm + end + fun find [a] f = let fun find' ls = |