Created
September 22, 2009 00:05
-
-
Save Burgestrand/190643 to your computer and use it in GitHub Desktop.
Re-implemented dot operator using fmap.
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
module MagicDot ((.)) where | |
import Prelude hiding ((.)) | |
import Control.Monad.Instances | |
(.) :: (Functor f) => (a -> b) -> f a -> f b | |
a . b = a `fmap` b | |
infixr 9 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment