
12 Mar
2003
12 Mar
'03
8:02 a.m.
How can I make an explicit function call in a "do" sequence?
Ex: ... do let a = myFunc ... b = myFunc ... c = "Something else" return c ...
As I understand myFunc will not be executed,
Correct.
but I need it...
If it has a side effect, it will have type "IO something" (or whatever monad your using) and you can write: do a <- myFunc ... If it doesn't have a side effect, why do it anyway? The result 'c' does not depend on a. Arjan