Mercurial > urweb
diff lib/ur/list.ur @ 840:e4a02e4fa35c
Fix unbound name problem in Jscomp injectors; more List stuff
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 06 Jun 2009 15:29:34 -0400 |
parents | b2413e4dd109 |
children | 9f0ea203a1ca |
line wrap: on
line diff
--- a/lib/ur/list.ur Sat Jun 06 14:09:30 2009 -0400 +++ b/lib/ur/list.ur Sat Jun 06 15:29:34 2009 -0400 @@ -150,3 +150,14 @@ search' end +fun foldlM [m] (_ : monad m) [a] [b] f = + let + fun foldlM' acc ls = + case ls of + [] => return acc + | x :: ls => + acc <- f x acc; + foldlM' acc ls + in + foldlM' + end