Le 11/06/2011 11:06, o...@okmij.org a écrit :
The following web page talks about lazy lists and generators
        http://okmij.org/ftp/continuations/generators.html
in (perhaps too) great detail.

Oleg, when you mention Icon, you might - perhaps - observe that Griswold didn't introduce the co-expressions (this is their terminology, not "generators") out of the air, they have been present as the "unevaluated expressions" in Snobol4. Icon has been built upon the Snobol4 philosophy, although as language it was very different.

Another remark about "yield" in Python. This is not just a non-deterministic return mechanism, but an expression, which yields a value also for the generator code. It becomes thus a reentrant co-procedure, which goes quite a mileage beyond the lazy list model.


Jerzy Karczmarczuk


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to