sortUniq
zeljkog via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jan 24 09:26:46 PST 2015
On 24.01.15 18:02, Andrei Alexandrescu wrote:
> On 1/24/15 7:17 AM, zeljkog wrote:
>>
>> private struct FilterResult(alias predicate, Range)
>> {
>> static if (is(predicate == struct))
>> predicate pred;
>> else
>> alias pred = predicate;
>> ...
>
> The problem is here - the creation of an empty object is unlikely to be
> of use to the caller. We should, however, support the case when the
> caller passes a stateful predicate into the call. -- Andrei
I think empty object could be useful, but perhaps there is better :)
Until now I concluded:
1. Resulting range must be output range. Right?
I don't know is it considerable problem?
2. unaryFun can pass down struct (with opCall check?)
More information about the Digitalmars-d
mailing list