Mercurial > meta
diff record.ur @ 10:763eb2f2aa5a
Record.mem
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 03 Feb 2011 09:31:32 -0500 |
parents | |
children | 67b33be5d56a |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/record.ur Thu Feb 03 09:31:32 2011 -0500 @@ -0,0 +1,5 @@ +fun mem [a ::: Type] [ns ::: {Unit}] (_ : eq a) (fl : folder ns) (x : a) (r : $(mapU a ns)) : bool = + @foldUR [a] [fn _ => bool] + (fn [nm ::_] [r ::_] [[nm] ~ r] y acc => + acc || x = y) + False fl r