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 obfuscated code.
the way i see : 1/ but why do you call it 'original equation' ? the original thing is expressed informaly in your head, then into a formula or an algorithm. Here i find the first one-liner really readable. (although i think it misses Y[0] = X[0]). But the loop is really readable too for imperative enabled mind. 2/ for me, list or loop is quite the same thing (in this case) (although loop is mor general since you can use the base index in weird ways). 3/ see 1/ and 2/ Jerzy : 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 ? thanks, vo minh thu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe