in reply to Re^6: Comparing a value to a list of numbers (updated)
in thread Comparing a value to a list of numbers

> I know there's probably a mathematically valid answer,

And that's how I'm thinking (... you know me so well ;-)

If binary search is used, it's based on numeric comparison.

The complement of <= is > and the rest is logic.

> $el=$set->next

well that's a feature of finite sets° which can't be applied here.

I'd throw an error in this case.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) to be precise: finite ordered sets