Blair,
> Hmmm, that is by design. The ifAbsent: block is only evaluated if the
> element searched for is not actually in the collection. If the block were
> also evaluated in the case where the located element happens to be the
last
> in the collection, then it would not be possible to tell between the case
of
> searching for something which isn't there, and the case of attempting to
> read off the end. On the other hand this would appear to make it rather
less
> than useful.
Agreed. I'd rather have the handler for the last element, and have it
signal a non found error if I'm stupid enough<g> to give a starting element
that's not in the collection.
> Actually I'm not convinced that #after:ifAbsent: or #before:ifAbsent: are
> actually that useful at all, so perhaps they should be removed altogether?
Subject to a change as suggested above, they seem useful enough. At least I
recently encountered a situation in which they were helpful.
Have a good one,
Bill
--
Wilhelm K. Schwab, Ph.D.
[hidden email]