I would like to add a counter in this loop in order to know the row of each element of the list. Do you have a simple solution ?
lists:foreach(fun(X) .... end,Y),
I would like to add a counter in this loop in order to know the row of each element of the list. Do you have a simple solution ?
lists:foreach(fun(X) .... end,Y),
If you want to roll your own, this appear to work as required:
The function
F
will be called with two parameters - the individual entry from the list and its index.Use lists:foldl or write your own function: