Lazy recursive list comprehensions

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Fri Jan 13 12:29:11 CET 2006

> The code builds a search space of 108 items in a list but the 
> same approach to a different problem could produce a search 
> space that is much larger. Is there a way to redesign the 
> code to use "lazy list comprehensions" while keeping the elegance?

The only implementation of lazy lists that crosses my mind right now is
using continuation-passing, and I don't think that keeps the elegance (but
that is just a matter of taste, others might disagree). 

On the other hand, if the lazyness would be hidden somehow in a library,
then the use of it could still be elegant. There would be no comprehensions,
but that's not a big deal.


More information about the erlang-questions mailing list