You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

11 lines
244 B

module Identity where
newtype Identity a = Identity a deriving (Show, Eq, Ord)
instance Functor Identity where
fmap f (Identity a) = Identity (f a)
instance Applicative Identity where
pure = Identity
(<*>) (Identity f) = fmap f