From 555b6a066f6a4a2396ead20e673b363c3706e713 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 6 Jun 2009 15:29:34 -0400 Subject: Fix unbound name problem in Jscomp injectors; more List stuff --- lib/ur/list.ur | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/ur/list.ur') diff --git a/lib/ur/list.ur b/lib/ur/list.ur index 0aae9010..89dc8bbd 100644 --- a/lib/ur/list.ur +++ b/lib/ur/list.ur @@ -150,3 +150,14 @@ fun search [a] [b] f = 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 -- cgit v1.2.3