diff src/list_util.sml @ 110:3739af9e727a

Starting with closure links
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jul 2008 11:43:57 -0400
parents 02f42e9a1825
children 6230bdd122e7
line wrap: on
line diff
--- a/src/list_util.sml	Sun Jul 13 10:17:06 2008 -0400
+++ b/src/list_util.sml	Sun Jul 13 11:43:57 2008 -0400
@@ -29,6 +29,16 @@
 
 structure S = Search
 
+fun mapConcat f =
+    let
+        fun mc acc ls =
+            case ls of
+                [] => rev acc
+              | h :: t => mc (List.revAppend (f h, acc)) t
+    in
+        mc []
+    end
+
 fun mapfold f =
     let
         fun mf ls s =