
26 Aug
2006
26 Aug
'06
2:14 p.m.
Il Sat, Aug 26, 2006 at 02:25:51PM +0100, Brian Hulley ebbe a scrivere:
runMSO :: MSO a -> State -> (a, State, Output) runMSO (MSO f) s = f s
this is exactly what I was looking for!!!! runMSO (MSO f) s = f s I've already done the previous part, but I was running it as: runMSO a = evalMSO a 0 and could not understand where the problem was! I though that the monad itself was wrong, and not that way I was running it!! sometimes I feel so stupid! the fact is that I was thinking that type MSO a = Int -> (a,Int,String) and MSO a = MSO (Int -> (a,Int,String) where the same stuff. I discovered the hard way that they are not, and it took me almost 2 days! Thanks a lot for your kind patience. Andrea