sortUniq

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 24 11:20:55 PST 2015


On 1/24/15 11:00 AM, H. S. Teoh via Digitalmars-d wrote:
> On Sat, Jan 24, 2015 at 10:35:13AM -0800, Andrei Alexandrescu via Digitalmars-d wrote:
>> On 1/24/15 9:34 AM, zeljkog wrote:
>>> On 24.01.15 18:26, zeljkog wrote:
>>>>
>>>> Until now I concluded:
>>>> 1. Resulting range must be output range. Right?
>>> Should be input range.
>>
>> For filter it's a forward range if input is forward or better. --
>> Andrei
>
> Hmm. Couldn't filter be made bidirectional too, if the underlying range
> is also bidirectional? After all, filtering doesn't depend on the
> surrounding elements, so in theory you should be able to popBack as
> well.

History: http://dlang.org/phobos/std_algorithm.html#.filterBidirectional

Andrei



More information about the Digitalmars-d mailing list