SortedRange and new docs for std.container

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Sep 8 06:55:30 PDT 2010


Hello,


I just added SortedRange as discussed a while ago in this newsgroup. I 
think it turned out pretty neat. Generally the range abstraction is 
turning out to be very solid.

To get a SortedRange object for a given range r either call sort(r) if 
you want to sort one, or assumeSorted(r) if you know that the range is 
sorted already.

I've also fixed Zip (finally!) to get rid of a couple of dirty tricks. 
It turns out that front()/front(v)/moveFront() are a correct way to 
abstract proxy ranges like Zip is.

Search this documentation preview for "SortedRange" and "Zip":

http://erdani.com/d/phobos/std_range.html
http://erdani.com/d/phobos/std_algorithm.html

I've also improved the look of container requirements, check:

http://erdani.com/d/phobos/std_container.html


Comments and ideas are welcome.

Andrei


More information about the Digitalmars-d mailing list