diff lib/ur/list.ur @ 843:9f0ea203a1ca

List.all; fix ANDALSO/ORELSE parsing precedence
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Jun 2009 14:15:22 -0400
parents e4a02e4fa35c
children 74a1e3bdf430
line wrap: on
line diff
--- a/lib/ur/list.ur	Sun Jun 07 12:01:55 2009 -0400
+++ b/lib/ur/list.ur	Sun Jun 07 14:15:22 2009 -0400
@@ -161,3 +161,13 @@
     in
         foldlM'
     end
+
+fun all [m] f =
+    let
+        fun all' ls =
+            case ls of
+                [] => True
+              | x :: ls => f x && all' ls
+    in
+        all'
+    end