merging map/filter/reduce/... in D
glathoud via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jan 29 00:06:14 PST 2016
Thanks. I am glad be wrong on that one.
I had a look at map & filter in the source code ; pleased to see
they're lazily implemented!
map
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/iteration.d#L425
filter
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/iteration.d#L924
I had to look for FilterResult!
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/iteration.d#L979
Small remark: One could make the laziness of filter a bit more
clear in the doc though - at least for newbies like me.
http://dlang.org/phobos/std_algorithm_iteration.html
Best regards,
Guillaume
More information about the Digitalmars-d-learn
mailing list