In Haskell the Monad typeclass is defined as
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
return :: a -> m a
It's tricky to translate this directly to a C# interface because you need to be able to reference the specific implementing subtype ("m a" or ISpecificMonad) within the definition of the general IMonad interface. OK, instead of
(
Read more... )