<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Prefect. Thanks.<br>
<br>
Randal L. Schwartz wrote:
<blockquote cite="mid:86ws0bkvs8.fsf@blue.stonehenge.com" type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">"LordGeoffrey" == LordGeoffrey <a class="moz-txt-link-rfc2396E" href="mailto:lordgeoffrey@optusnet.com.au"><lordgeoffrey@optusnet.com.au></a> writes:
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->
LordGeoffrey> Is there a method that does what magicDo does?
LordGeoffrey> #(#(1 2 true)
LordGeoffrey> #(2 1 false)) magicDo: [:a :b :r |
LordGeoffrey> "do something useful"
LordGeoffrey> ] _______________________________________________
LordGeoffrey> Beginners mailing list
LordGeoffrey> <a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a>
LordGeoffrey> <a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a>
what do you want a, b, and r to be?
Maybe the values 1, 2, true the first time, and 2, 1, false the second?
If so:
#((1 2 true) (2 1 false)) do: [:row |
[:a :b :r | "do something useful" ] valueWithArguments: row.
].
Beware... if your row doesn't have exactly three values, you'll
get an exception. If you don't want that, consider #valueWithPossibleArgs:
</pre>
</blockquote>
<br>
</body>
</html>