[Newbies] combining arrays.....?

David Mitchell david.mitchell at gmail.com
Tue May 4 02:25:10 UTC 2010


These types of questions are perfect for the Method Finder.

>From the world menu, select open, Method Finder. A SelectorBrowser window
appears.

Type this into the upper left pane:

#(1 2 3 4 5) .  #(a b c) . #(1 a 2 b 3 c 4 5)

And press Enter. A message appears "No single method does that function."
"The Method Finder doesn't know of any message that sends those arguments to
the receiver and returns that result."

The Method Finder has a bunch of selectors preloaded and when you execute
it, It sends all of them that match the number of arguments to the receiver
and checks it against the expected result.

Nifty and cool for questions like this.

I also tried another example (based of Sergio's answer):

#(1 2 3 4 5) . #(a b c) . #(1 2 3 4 5 a b c).

And got back the message #,


--David
http://www.withaguide.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100503/4e99ca8f/attachment-0001.htm


More information about the Beginners mailing list