[Aldor-l] Generators

Martin Rubey martin.rubey at univie.ac.at
Thu Nov 8 14:29:33 EST 2007


I looked into loop0.  It seems that Peter's patch doesn't mix well with the
such that clause.  The snippet below yields [1,2,3] instead of [1]...

Martin

#include "aldor"
#include "aldorio"

g: Generator Integer == generate { yield 1; yield 2; yield 3; }

import from Integer;
bar():List(Integer) == [i for i in g | i=1];

import from List(Integer);
stdout << bar();





More information about the Aldor-l mailing list