MOO-cows Mailing List Archive


Re: [WISH LIST] Multple verb calls.. (read on)

On Fri, 4 Oct 1996, Michael Moore wrote:
> > for x in ({#99,#100,#101})
> >   x:tell("Whatever.");
> > endfor
> > 
> > What if all we had to do was say:
> > 
> > {#99,#101,#100}:tell("Whatever.");
> > 
> > And the server would automatically read it like the first example?
> > Just a thought..?
> Have a look at $list_utils:map_verb() in Lambdacore.
> $list_utils:map_verb({#99,#101,#100},"tell","Whatever.");
> If the verb returns a result, then :map_verb() returns a list of the
> results from each verb call.
> It also has :map_prop() and :map_arg() which do other similar multiobject
> things.

Ah! I was wondering what those were for. ;) How about something that will 
do this:

for x in (args)
  {this, that} = x
  ... stuff ...

for {this, that} in (args)
... stuff ...

We have scattering in assignment, but not in for.

*This article is a natural product.  The slight variations in logic and
*coherence enhance its individual character and beauty and in no way
*are to be considered flaws or defects.


Home | Subject Index | Thread Index