Open
Description
Hi
My use case frequently involves mapping a list of raw data into a UI representation that offers the ability to modify elements. For instance mapping a list into table rows, where the user may modify or delete rows. I was thinking having the index available when mapping would allow me to efficiently update the list on that index.
One could use List.zipWith(f, list, List.range(0,List.length(list))) or avoid the index and use List.find but maybe there is a place for a dedicated mapWithIndex function as that should theoretically be more efficient?
Does anyone else have similar use-cases and what is your solution?
Finally, thanks for a great lib!
Metadata
Metadata
Assignees
Labels
No labels