Do sorted ranges have any special properties?

Philippe Sigaud philippe.sigaud at gmail.com
Tue Jul 27 06:19:29 PDT 2010


On Tue, Jul 27, 2010 at 07:04, Andrei Alexandrescu <
SeeWebsiteForEmail at erdani.org> wrote:

>
> Also, I can't stop thinking that it's stand-alone find()'s job utilize
>> whatever features the range has (be it random access, sortedness, or
>> anything else) to execute fast, not the passed in range's.
>>
>
> Good point, though that reintroduces the question of comparing find's
> predicate with SortedRange's predicate.
>
>
I really don't see how you would do that in a generic way... Even taking
into account that predicates return a very simple value (bool) and that they
terminate (well, the input range's one _was_ used to sort it), that's akin
to determining if two unknown functions produce equal values.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100727/2e13faec/attachment.html>


More information about the Digitalmars-d mailing list