On 2015-01-30 at 18:42, FG wrote:
But you may wonder what the design choice behind that was that reverse doesn't 
return the range itself while sort does (a SortedRange, specifically).

Although, after thinking about it, it makes sense. sort is used mostly to 
enforce that something is sorted in case it isn't already, so chaining it with 
other functions is reasonable, while in case of reverse you don't normally call 
it very often, it's cheaper to wrap the range in a retro range and iterate 
backwards when required, without touching the original.

Reply via email to