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

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to