June 7, 2010
4:59 p.m.
On 6/7/2010 5:03 AM, Lukas Renggli wrote:
Am I the only one who finds the ruby protocol for accessing collections richer at times? In Smalltalk, if ary is an array, how do I get ary without its last element?
anArray allButLast
Or for other amounts, allButLast: x There's also allButFirst and allButFirst: x. A look at the protocol of SequenceableCollection would have revealed this in seconds. -- Ramon Leon http://onsmalltalk.com