Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-22 Thread Jerzy Karczmarczuk
Brian Hulley wrote: [EMAIL PROTECTED] wrote: you may transform a recurrential equation yielding Y out of X: Y[n+1] = a*X[n+1] + b*Y[n] usually (imperatively) implemented as a loop, into a stream definition: ... Can you explain how this transformation was accomplished? I don't see how yq

Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-22 Thread minh thu
hi ! 2006/6/22, Brian Hulley [EMAIL PROTECTED]: [snip] So: 1) Someone reading the code needs to do a lot of work to try to recover the original equation 2) Wouldn't an imperative loop, using the original equation directly, have made everything much simpler? 3) Therefore laziness has lead to

Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-22 Thread Udo Stenzel
[EMAIL PROTECTED] wrote: apparently - Clean has better handling of strictness issues [saying at the same time that he/she doesn't use Clean...] Uhm... well... and does it? From what I've heard, Clean has the same mechanism as Haskell, which is the 'seq' primitive. Clean just adds some

Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-22 Thread Jerzy Karczmarczuk
minh thu wrote: /about the stream algorithms, lazy style/ can you know a mean to express such computation but with elements depending of time (in about the same way as languages as esterel) (i.e. depending of IO)? Paul Hudak uses a Channel in his book Haskell SOE .. but is there another way ?

Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-22 Thread Ross Paterson
On Thu, Jun 22, 2006 at 01:24:32PM +0200, Jerzy Karczmarczuk wrote: I believe that ways of producing intricate streams by such languages or Lustre are somehow based on continuation mechanisms. The paper on Esterel, etc. : ftp://ftp-sop.inria.fr/esterel/pub/papers/foundations.pdf gives you

Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-21 Thread Brian Hulley
[EMAIL PROTECTED] wrote: [snip] you may transform a recurrential equation yielding Y out of X: Y[n+1] = a*X[N+1] + b*Y[n] usually (imperatively) implemented as a loop, into a stream definition: filtr a b x@(x0:xq) = y where y = (x0:yq) yq = a*xq + b*y Can you explain how this transformation