120
правок
Изменения
→Categories
==Categories==
class Category cat where id :: cat a a (Functor f.) =:: cat b c -> Applicative f cat a b -> cat a c
data MaybeIdentity a = Identity { runIdentity :: a }
instance Monad Maybe where Nothing >>= f = Nothing (Just x) >>= f = f x return x = Just x instance Monad [] where m >>= f = concat (map f m) return x = [x]
data State