I must confess that I love this group...:-)
Very enthusiastic!!!

Ryan Leavengood wrote:
>
> Overall Martin's was the best. As he suspected, David's was quite
> slow. Sam's as well.
>

Ryan, thanks for the benchmarking.
Please, add my original solution to your benchmark.
It seems to be very fast.
The reason I asked the question was not performance but briefness and
rubish style.
The slow one I came up later looks very intuitive and brief but suffers
from performance.
Briefness and performance don't always go together.

Regards,
Sam