
19 Dec
2010
19 Dec
'10
6:10 a.m.
On Sun, 19 Dec 2010, ender wrote:
Hi Henning: Thanks for your quick reply. So recursive and monad is the proper way to simulate loop,right?
I kept close to your suggestion, but avoiding monads, especially IO, is a good idea. If you do not need low-level memory access with peek and poke, better use lists or arrays (high level) or StorableVector (more efficient but not as flexible as array). http://www.haskell.org/haskellwiki/Avoiding_IO Avoiding explicit recursion is also a good thing - using too much (tail) recursive function calls ends up looking like code with lots of GOTOs. Better use higher order functions. http://www.haskell.org/haskellwiki/Haskell_programming_tips#Avoid_explicit_r...