Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-10 Thread Cristiano Paris
2009/7/9 Marcin Kosiba marcin.kos...@gmail.com: On Thursday 09 July 2009, Cristiano Paris wrote: 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

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-10 Thread Simon Richard Clarkstone
Thomas Davie wrote: On 9 Jul 2009, at 14:55, Cristiano Paris wrote: I'm wondering what a good example of why laziness enhances composability would be. I'm specifically looking for something that can't implemented in Python with iterators (at least not elegantly), but can actually be

[Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Cristiano Paris
Hi, I'm wondering what a good example of why laziness enhances composability would be. I'm specifically looking for something that can't implemented in Python with iterators (at least not elegantly), but can actually be implemented in Haskell. Thanks, Cristiano

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Jeremy Shaw
Hello, A wonderful, and practical example, is the techniques in this modular lazy search paper: http://web.cecs.pdx.edu/~apt/jfp01.ps They build simple solvers, like backtracking, backjumping, etc. and then compose them together like: bt . bj The techniques are very much based on laziness.

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Thomas Davie
On 9 Jul 2009, at 14:55, Cristiano Paris wrote: Hi, I'm wondering what a good example of why laziness enhances composability would be. I'm specifically looking for something that can't implemented in Python with iterators (at least not elegantly), but can actually be implemented in

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Cristiano Paris
Thank you for your suggestions! C. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Bulat Ziganshin
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

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Cristiano Paris
On Thu, Jul 9, 2009 at 3:42 PM, Bulat Ziganshin bulat.zigans...@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,

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Janis Voigtlaender
Bulat Ziganshin 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 Aeh, ... Wadler's - Hughes' -- Dr. Janis Voigtlaender http://wwwtcs.inf.tu-dresden.de/~voigt/

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Marcin Kosiba
On Thursday 09 July 2009, Cristiano Paris wrote: 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

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Marcin Kosiba
On Thursday 09 July 2009, you wrote: 2009/7/9 Marcin Kosiba marcin.kos...@gmail.com: I thought I'll go the smart way and rely on the Python yield construct to do a CPS transformation of my code.        While this worked to a certain extent, composability was a problem, because any