What is "FilterResult" type?
Bahman Movaqar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 11 02:09:04 PDT 2015
On Wednesday, 9 September 2015 at 13:16:49 UTC, cym13 wrote:
>> True. But is pumping the output of `filter` as the seed into
>> `reduce` really considered weird usage!?
>
> I don't think it is really weird per se, I just can't think of
> a case where there isn't a better way to do it. I find it
> completely unreadable frankly, and I generally avoid reduce
> when I can because it is not UFCS-able. This is only personal
> opinion though.
Now I see your point. I too find fold/reduce the least
transparent verb of the list comprehension. And certainly your
point about UFCS adds to it.
More information about the Digitalmars-d-learn
mailing list