3 ms·
>My favorite is one where a previous entry-level guy wrote a loop I'll be honest. I barely write any sort of loop in groovy. I just checked. One of my project
by imtringued 6y ago
>My favorite is one where a previous entry-level guy wrote a loop
I'll be honest. I barely write any sort of loop in groovy.
I just checked. One of my projects had 1 for loop and zero while loops. Everything else was done with findAll, collect, each etc.
- lmilcin 6y agoFindall/collect/each are not replacement for for loop. They only replace special case of for loop where you are not interested in the value of index. In general, applications that just process collections of items and running some logic on them can most of the time get away without using for loops, as is probably your case.