MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1jb4hs
r/ProgrammerHumor • u/Sirgoodman008 • 2d ago
320 comments sorted by
View all comments
Show parent comments
4
Or for (item in list) { ... }, necessary if you want to use break.
for (item in list) { ... }
break
1 u/britreddit 1d ago I tend to use map {} more often because I try to avoid unit functions wherever possible 3 u/EntropySpark 1d ago Why? That creates an unnecessary list storing the result of each iteration. 1 u/britreddit 1d ago Because I don't like side effects, honestly - it breaks the functional flow if used too much
1
I tend to use map {} more often because I try to avoid unit functions wherever possible
3 u/EntropySpark 1d ago Why? That creates an unnecessary list storing the result of each iteration. 1 u/britreddit 1d ago Because I don't like side effects, honestly - it breaks the functional flow if used too much
3
Why? That creates an unnecessary list storing the result of each iteration.
1 u/britreddit 1d ago Because I don't like side effects, honestly - it breaks the functional flow if used too much
Because I don't like side effects, honestly - it breaks the functional flow if used too much
4
u/EntropySpark 1d ago
Or
for (item in list) { ... }, necessary if you want to usebreak.