From 3d7820916ae84710cab458c6b4ba9b1412ee3f5d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 7 Jun 2009 16:45:00 -0400 Subject: Fix datatype import bug in Elaborate; fix server-side source setting; more standard library stuff --- lib/ur/listPair.ur | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/ur/listPair.ur') 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 -- cgit v1.2.3