[Issue 12188] std.algorithm.nextPermutation requires random access

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 11 08:12:47 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12188

--- Comment #4 from Peter Alexander <peter.alexander.au at gmail.com> ---
(In reply to Andrei Alexandrescu from comment #3)
> It's easy to implement allBefore to return a new range type distinct (e.g.
> Voldemort) from R. That range would keep the two ranges as state and would
> say it's empty when whole.sameHead(right).

If I've understood you correctly, the range you describe can't be
bidirectional, which is what we need here.

--


More information about the Digitalmars-d-bugs mailing list