Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created December 7, 2011 06:54
Show Gist options
  • Save onlyshk/1441777 to your computer and use it in GitHub Desktop.
Save onlyshk/1441777 to your computer and use it in GitHub Desktop.
data Pair
data Pair a = Pair a a deriving Show
instance Functor Pair where
fmap f (Pair x y) = Pair (f x) (f y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment