Counting from zero
Nagy Attila
attis at gizi.dote.hu
Mon May 1 21:25:07 UTC 2006
Now I know what the title William Gibson's novel 'Count Zero' refers to. ;)
I find Laurence's solution very elegant. I can even imagine adding a
method to Integer:
Integer>>countZero
^ self + 1
Then you could have:
someCollection at: 5 countZero
Legible and simple, what do you say?
Attis
More information about the Squeak-dev
mailing list
|