diff options
author | 2009-06-07 14:15:22 -0400 | |
---|---|---|
committer | 2009-06-07 14:15:22 -0400 | |
commit | 07249bc2c07b2af3b9decb84ce968e3005a19c0f (patch) | |
tree | 15b41a16e734ff4738bf2b275546736121cf125a /lib/ur/list.ur | |
parent | 2b3788462fada38dab4a72d036aff5e66b8d9240 (diff) |
List.all; fix ANDALSO/ORELSE parsing precedence
Diffstat (limited to 'lib/ur/list.ur')
-rw-r--r-- | lib/ur/list.ur | 10 |
1 files changed, 10 insertions, 0 deletions
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 |