Dear Oliver,

Be aware that some loop features change the nature of the loop.  The
'collect' feature turns a for-loop *statement* into an *expression*.  Here
is an example of a loop using a collector:

%% collects all squares of even elements of L
%% equivalent to {Map {Filter L IsEven} fun {$ X} X*X end}
Evens = for X in L   collect:Collect do
           if {IsEven X} then {Collect X*X} end
        end

Cheers,
raph

On Tue, Sep 9, 2008 at 6:16 PM, Oliver Mooney <[EMAIL PROTECTED]>wrote:

> Hi all,
> The Mozart documentation on Loop support mentions a number of experimental
> extensions to the syntax such as unary collection procedures. Are these
> currently enabled? I can't seem to bind to the collect feature, but I can
> bind to the break feature without issue.
>
> The documentation I'm using is at
> http://www.mozart-oz.org/documentation/loop/index.html
>
> Thanks,
> Oliver.
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to