[Haskell-cafe] Lazy lists vs generators

Jerzy Karczmarczuk jerzy.karczmarczuk at unicaen.fr
Sat Jun 11 14:25:08 CEST 2011

Le 11/06/2011 11:06, oleg at 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

More information about the Haskell-Cafe mailing list