takeBack() implementation in std.range for OutputRanges

Salih Dincer salihdb at hotmail.com
Sun Sep 1 21:16:31 UTC 2024


On Saturday, 31 August 2024 at 22:29:57 UTC, monkyyy wrote:
> On Saturday, 31 August 2024 at 17:55:17 UTC, Salih Dincer wrote:
>> Why have a function called dropBack() but not takeBack()?
>
> probably retro.take is considered good enough? When 
> retro.drop.retro isnt

The problem is that, whether retro() or dropBack() works with 
BidirectionalRange. So we need to find different solutions. If 
everything was an array, things would be easier, but I don't know 
how to get the last 4 elements of a range of known length, other 
than filtering! Does anyone have another practical solution?

SDB at 79


More information about the dip.ideas mailing list