join

Klaus D. Witzel klaus.witzel at cobss.com
Wed Sep 20 04:59:20 UTC 2006


On Wed, 20 Sep 2006 01:21:57 +0200, Keith Hodges wrote:
...
> For example, using your logic, you would never come up with this idea.
>
> 1 to: 10 do: [:b ].
>
> I think your version might look like something from another thread on  
> squeak-dev at the moment. ACollection>>from:to:apply:

And I thought that would slip through unnoticed ;-)

The original suggestion was, aBlock>>apply: aCollection from: start to:  
stop.

Since only collections can know how to do that, aBlock and aCollection had  
to be swapped. Of course your suggestion #from:to:apply: is also a good  
one.

-----------

Wrt #join, my favorites are your joinUsing: and useToJoin: this is  
Smalltalk land and people (incl. newbies) use method finder, if not for  
finding #substring.

I use #substring as an exmple for the utility of method finder because in  
other languages is takes one or two arguments and so in Smalltalk *must*  
have another name.

/Klaus




More information about the Squeak-dev mailing list