tblanchard at mac.com
Tue Oct 3 18:51:19 UTC 2006
Really? Its not a binary search? Seems like it should be.
On Tuesday, October 03, 2006, at 10:54AM, J J <azreal1977 at hotmail.com> wrote:
>I was going through the collections today and I noticed something I was
>1. Why doesn't sorted collection over-ride any of the search messages (e.g.
>occuranceOf:)? Since the data is sorted, I would think it would have a
>chance for a more efficient search.
>2. Is there a better way then making a message "select:upTo:"? In an
>application I am writting, I provide an interface to a collection (of dates)
>and one of the things you can do is ask for "nextDates: aNumber". The most
>efficient way to impliment this, since my collection is ordered, would be if
>I could go:
> ^ dates select: [ "some test" ] upTo: aNumber
>Before I impliment this myself: is there some way that people do this
>normally, and that's why no one has implimented this yet?
More information about the Squeak-dev