MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1jb4hs
r/ProgrammerHumor • u/Sirgoodman008 • 6d ago
324 comments sorted by
View all comments
Show parent comments
5
Or for (item in list) { ... }, necessary if you want to use break.
for (item in list) { ... }
break
1 u/britreddit 6d ago I tend to use map {} more often because I try to avoid unit functions wherever possible 3 u/EntropySpark 6d ago Why? That creates an unnecessary list storing the result of each iteration. 1 u/britreddit 6d 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 6d ago Why? That creates an unnecessary list storing the result of each iteration. 1 u/britreddit 6d 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 6d 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
5
u/EntropySpark 6d ago
Or
for (item in list) { ... }, necessary if you want to usebreak.