Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created December 20, 2013 08:49
Show Gist options
  • Select an option

  • Save pedrofurla/8052119 to your computer and use it in GitHub Desktop.

Select an option

Save pedrofurla/8052119 to your computer and use it in GitHub Desktop.
Improvements?
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' f mm = banana (unicorn . f) mm
--furry' f = banana (unicorn . f)
--furry' f mm = banana (\x → unicorn (f x)) mm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment