Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 4th, 2010 | Syntax: Haskell | Size: 0.21 KB | Hits: 71 | Expires: Never
Copy text to clipboard
  1. class Functor f where
  2.     fmap :: ( a -> b ) -> f a -> f b
  3.  
  4. class ContraFunctor f where
  5.     contraMap :: ( a -> b ) -> (f b -> f a)
  6.  
  7. instance ContraFunctor Maybe where
  8.     contraMap f (Just a) = Just (f a)