diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-06-07 16:45:00 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-06-07 16:45:00 -0400 |
commit | 3d7820916ae84710cab458c6b4ba9b1412ee3f5d (patch) | |
tree | 30300e247037398cd77a827ae1c38b96d19baec7 /lib/ur/listPair.ur | |
parent | 818577c761fb4d2ebbddbeb614bfbf33e38b92f6 (diff) |
Fix datatype import bug in Elaborate; fix server-side source setting; more standard library stuff
Diffstat (limited to 'lib/ur/listPair.ur')
-rw-r--r-- | lib/ur/listPair.ur | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ur/listPair.ur b/lib/ur/listPair.ur index a46cf187..8d1c873e 100644 --- a/lib/ur/listPair.ur +++ b/lib/ur/listPair.ur @@ -8,3 +8,14 @@ fun mapX [a] [b] [ctx ::: {Unit}] f = in mapX' end + +fun all [a] [b] f = + let + fun all' ls1 ls2 = + case (ls1, ls2) of + ([], []) => True + | (x1 :: ls1, x2 :: ls2) => f x1 x2 && all' ls1 ls2 + | _ => False + in + all' + end |