Skip to content

Instantly share code, notes, and snippets.

@Burgestrand
Created September 22, 2009 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Burgestrand/190643 to your computer and use it in GitHub Desktop.
Save Burgestrand/190643 to your computer and use it in GitHub Desktop.
Re-implemented dot operator using fmap.
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