in reply to Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
Here goes in Smalltalk:
#('one' 'two' 'three' 'four') reversed
Do a print-It in the workspace and it gives:
#('four' 'three' 'two' 'one')
You put your things in an OrderedCollection and this collection has a reversed message that can be sent to it. Voilą !
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Smalltalk - Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
by jdporter (Paladin) on Apr 04, 2009 at 13:11 UTC |
In Section
Meditations