MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
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:
Current:
for x in (args)
{this, that} = x
... stuff ...
endfor
New:
for {this, that} in (args)
... stuff ...
endfor
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.
References:
Home |
Subject Index |
Thread Index