I\'ve just wrapped my head around monads (at least I\'d like to think I have) and more specifically the state monad, which some people that are way smarter then me figured o
Ah, yes, if the question is: should I use a single-tag Discriminated Union that carries a data value of type T, or should I just use T, then you can use either.
In Haskell, you need to use a data tag with monads, since the Haskell do
syntax infers the monad type based on value types (a tuple representation could be an instance of at most a single Monad). Whereas in F#, computation expressions are explicit about the monad type (e.g. state { ... }
or async { ... }
or whatever) so this restriction is not necessary, the same representation type could be used for multiple monads.