Created
December 22, 2013 20:58
-
-
Save pedrofurla/8088366 to your computer and use it in GitHub Desktop.
Is Misty ((->) t) banana right?
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
| class Misty m where | |
| banana :: (a -> m b) -> m a -> m b | |
| unicorn :: a -> m a | |
| -- Exercise 6 | |
| -- Relative Difficulty: 3 | |
| -- (use banana and/or unicorn) | |
| furry' :: (a -> b) -> m a -> m b | |
| furry' = banana . (unicorn .) | |
| instance Misty ((->) t) where | |
| banana f m = \t → f (m t) t | |
| unicorn a = \t → a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment