[Haskell-cafe] Laziness enhances composability: an example

Cristiano Paris cristiano.paris at gmail.com
Thu Jul 9 10:05:43 EDT 2009


On Thu, Jul 9, 2009 at 3:42 PM, Bulat Ziganshin
<bulat.ziganshin at gmail.com> wrote:
>
> Hello Cristiano,
>
> Thursday, July 9, 2009, 4:55:09 PM, you wrote:
>
> the best known example is chessmate implementation in Wadler's "why
> functional programming matter"
>
> but i don't know much about Python iterators, so can't say what is
> difference. may be its' only simplicity since lazy lists is looks like
> and processed just as lists while generators in any other language is
> separate data structure

Thanks. In fact, I was stuck trying to find an example which couldn't
be written using Python's iterators. The only difference coming up to
my mind was that Haskell's lists are a more natural way to express a
program relying on laziness. That was the reason why added the clause
"at least not elegantly" in my first post.

Cristiano


More information about the Haskell-Cafe mailing list