Created
July 15, 2009 12:00
-
-
Save robertpfeiffer/147664 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Animal food = Animal String | |
data Carnivorous = Meat | The (Animal Herbivorous) | |
data Herbivorous = Plant | |
gnu::(Animal Herbivorous) | |
gnu = Animal "gnu" | |
wolf::(Animal Carnivorous) | |
wolf = Animal "wolf" | |
eat::(Animal a) -> a -> String | |
eat animal food = "mjam mjam" | |
-- gnu `eat` Plant | |
-- wolf `eat` (The gnu) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment