re: Everything You Need to Know About Array#reduce VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just read about it. Ranges look really useful!
 

It is funny because Ranges a close to c# LINQ or Java stream. D got to really build its algorithms around it (well technically many types of ranges).

Though coding with lazy evaluation can have its surprises when you're not always aware of the implications.

For example several grouping functions, like chunkBy, require the range to be sorted by the grouping. Sorting is eager, but grouping doesn't need to be. And you can group an unsorted range which could have value... Maybe.

code of conduct - report abuse