Dear Raph,
Thanks very much for the pointer - I see now that the documentation says as
much in the very first sentence discussing list accumulators! My apologies,
I don't know how I manged to miss that.
Thanks,
Oliver.
>
> 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
>
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users