From 07249bc2c07b2af3b9decb84ce968e3005a19c0f Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 7 Jun 2009 14:15:22 -0400 Subject: List.all; fix ANDALSO/ORELSE parsing precedence --- lib/ur/list.ur | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/ur/list.ur') diff --git a/lib/ur/list.ur b/lib/ur/list.ur index 89dc8bbd..771cddc3 100644 --- a/lib/ur/list.ur +++ b/lib/ur/list.ur @@ -161,3 +161,13 @@ fun foldlM [m] (_ : monad m) [a] [b] f = in foldlM' end + +fun all [m] f = + let + fun all' ls = + case ls of + [] => True + | x :: ls => f x && all' ls + in + all' + end -- cgit v1.2.3