[Issue 12655] foldRange
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Apr 11 11:09:34 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=12655
--- Comment #4 from bearophile_hugs at eml.cc ---
(In reply to jens.k.mueller from comment #3)
> A cumulate returning the same number elements can be written using map.
> ...
> I leave this here for reference and others to decide whether such a function
> should be added to Phobos.
It's often a bad idea to define *basic* ranges in terms of others. Because they
lose performance.
You get short sexy elegant code that dooms all the user code to be slow
(sometimes even if you compile with optimizations on).
--
More information about the Digitalmars-d-bugs
mailing list