
1 Feb
2010
1 Feb
'10
9:37 p.m.
zaxis
However, i donot know how to write pure function using C style. func1 a = { -- ...; a * 2; -- ...; }
You mean imperatively? Short answer: you can't and you shouldn't. Slightly longer answer: you can possibly fudge something together using the Identity monad from mtl, but that will involve wrapping/unwrapping everywhere. Learn to think about how to chain/group functions together to form more of a "pipeline" rather than a sequence of statements. Haskell =/= C. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com