reverseMap is a pretty handy function for efficiently mapping and reversing a List. It is inspired by OCaml's List.rev_map function.
An example use case is if you have a list of events in chronological order, and you would like to display them in reverse chronological order (like on a résumé or a todo list). Using reverseMap, you can convert each event into an Html msg and reverse the order of the events all in a single pass.
reverseMap
is a pretty handy function for efficiently mapping and reversing aList
. It is inspired by OCaml'sList.rev_map
function.An example use case is if you have a list of events in chronological order, and you would like to display them in reverse chronological order (like on a résumé or a todo list). Using
reverseMap
, you can convert each event into anHtml msg
and reverse the order of the events all in a single pass.