
3 Oct
2013
3 Oct
'13
1:34 a.m.
I think I did understand Monads and Arrows. So I put it to the test: I tried to write my own State Monad and an State Arrow without looking at the real implementation. This is what I got: http://lpaste.net/93801 Please take a look on line 146 where I try to define a State Monad that is represented with a full function (state+result -to- state+result -- like my Arrow implementation). Things got hairy with the bind operator (line 153) and I just hit the keyboard until I hit the correct types and got it to compile. Yet, I can't fully understand my own bind implementation. Using the result "a" twice seems to be wrong, but I couldn't write a test to prove it.
4294
Age (days ago)
4294
Last active (days ago)
0 comments
1 participants
participants (1)
-
Thiago Negri