We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43e3080 commit 93ad06aCopy full SHA for 93ad06a
lib/List.trp
@@ -72,9 +72,9 @@ let (* -- List Access -- *)
72
(** Same as `List.map` but `f` is applied to the index of the element as first argument
73
(counting from 0), and the element itself as second argument. Not tail-recursive. *)
74
fun mapi f list =
75
- let fun mapj j [] = []
76
- | mapj j x::xs = (f (j,x)) :: (mapj (j+1) xs)
77
- in mapj 0 list
+ let fun mapi_aux j [] = []
+ | mapi_aux j x::xs = (f (j,x)) :: (mapi_aux (j+1) xs)
+ in mapi_aux 0 list
78
end
79
80
(* TODO: revMap *)
0 commit comments