- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Frist of all, the fix better include some unit tests.
Admin
Frist of all, the fix better include some unit tests.
Admin
To prevent reduplication, I presume?
Admin
Might be a good idea to check the other code this guy added to the codebase, if this is the standard of quality he delivers.
Admin
why explicitly loop? what's wrong with something like [... new Set(zones)] ? (disclaimer I haven't tried it but surely it's something like that)
Admin
And who says unions aren't good for workers?
Admin
The icing on the cake is that the result of the union is assigned to
accumulator
, which, of course, does absolutely nothing because assignments to function arguments are lost after returning from the function. The reasonreduce
returns anything at all is because assignment is an expression that returns the assigned value, so_.union(currentValue)
is returned from the lambda and becomes the new reduction result.Admin
I was going to join the union, but since there was someone after me, I decided not to bother.
Admin
Ah, I see another person has to contend without useful unit tests.