Friday, December 17, 2010

Monad composition with state and seq in F#

I've become master of the generic state monad: its a state monad with multiple independent inner states. Pursuing my late night education sessions, I tried out something that I was thinking about for some times: that some of these inner states be themselves monads. In my case, I added one new state of type "sequence" (F# enumerative monad), I use it to trace execution for debugging purpose. And it works very well.

No comments: