mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
This is a bit of a style preference since of course you can always write the same thing with a for loop. However, I think sometimes the code looks better when using this method. It also provides an alternative to Sequence.map for cases where you don't need the resulting list, and one that becomes especially necessary when Sequence.map is changed to return a new sequence. The example in the README.md file was using Sequence.map in a way that required this alternative in that case.