Torsten Anders wrote:
On Monday 07 May 2007 09:44, Raphael Collet wrote:
%% the first 10 elements are distant from at least 2
Xs10={List.take Xs 10}
for X in Xs10  Y in Xs10.2 do
    Y >=: X + 2
end

Sure, that's better than introducing additional variables.
You can even avoid calling List.take by using an additional iterator:

for  I in 1..9 X in Xs  Y in Xs.2 do
 Y >=: X + 2
end

Cheers,
Luis
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to