List Info

Thread: Easiest way to curry unevaluated args?




Easiest way to curry unevaluated args?
user name
2006-02-15 05:17:31
Hi Devin,

On 2/15/06, devinmullins <twifkakcomcast.net> wrote:
&gt; Contrived example:
>
> foompa := method( // takes two args
>  ; for(???, 1, 10, ???)
> )

Is usually implemented as,

foompa := method(
&nbsp;   iName := call message argAt(0) name
&nbsp; &nbsp; body := call message argAt(1)
  ;  for (i, 1, 10,
 ; &nbsp; &nbsp; &nbsp; call sender setSlot(iName, i)
   ; &nbsp; &nbsp; call sender doMessage(body)
&nbsp; &nbsp; )
)

foompa(i,
&nbsp; &nbsp; writeln(i)
)

----

1
2
3
4
5
6
7
8
9
10


I'm not sure if this is the answer you were looking for. Sorry, I
haven't taken the time to understand the second part yet.

Jonathan.
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )