Created
March 8, 2013 12:22
-
-
Save yashigani/5116116 to your computer and use it in GitHub Desktop.
すごいH本読書会 in 大阪 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Akari a = Waai a (Akari a) | Daisuki deriving (Show) | |
data H oo gle = H oo oo oo oo oo gle deriving (Show) | |
data Ha y oo = Ha y oo oo oo oo oo deriving (Show) | |
data O b = OOOO|OOOOOO|O|OO deriving (Show) | |
data Hom r a = Hom (r -> a) | |
data State s a = State (s -> (a, s)) | |
data Just a = Nothing | Maybe (Maybe a) | |
instance Functor Akari where | |
fmap _ Daisuki = Daisuki | |
fmap f (Waai a akari) = Waai (f a) (fmap f akari) | |
instance Functor (H oo) where | |
fmap f (H a b c d e gle) = H a b c d e (f gle) | |
instance Functor (Ha y) where | |
fmap f (Ha y a b c e d) = Ha y (f a) (f b) (f c) (f d) (f e) | |
instance Functor O where | |
fmap _ OOOO = OOOO | |
fmap _ OOOOOO = OOOOOO | |
fmap _ O = O | |
fmap _ OO = OO | |
instance Functor (Hom r) where | |
fmap f (Hom a) = Hom (f . a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment