[Newbies] Array questions
Randal L. Schwartz
merlyn at stonehenge.com
Fri Apr 23 22:36:58 UTC 2010
>>>>> "noobie" == noobie <pntball650 at aol.com> writes:
noobie> I have a few questions about writing methods dealing with
noobie> arrays....
Arrays are a kind of Collection. Smalltalk's collection classes have a
very rich protocol. If you start with Collection in a Hierarchical
Browser, you'll see a dozen classes that derive from Collection and are
optimized for different things.
The key methods are #select:, #detect:, #reject:, #collect:, and
#inject:into:. Learn those first, because your methods would be
built trivially with them, and then could be placed at Collection, not
at Array, since your problem is more general than Arrays. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
More information about the Beginners
mailing list