It seems finding a good name is more difficult than providing possible usage examples (which I will try to do later).
What about onEach? It may be perceived as a shortened form of the verbose “perform an action on each element”. “On” implies some direct action (unlike “for”, which just provides an argument without changing the receiver) and is luckily also short.
withEach name suggested by Sergey Igushkin in the issue above is good, because it pairs nicely with with. Although one could extend this logic further by stating that run suits even better, because run itself is an extension function (unlike with). However, runEach or eachRun would look rather awkward.
1 Like