Commits

Anonymous committed 7686f5b

+ List.mapi

Comments (0)

Files changed (1)

     ;
 
 
+    value mapi f lst =
+      loop 0 [] lst
+      where rec loop i acc lst =
+        match lst with
+        [ [] -> List.rev acc
+        | [h :: t] ->
+            loop (i + 1) [(f i h) :: acc] t
+        ]
+    ;
+