Skip to content

Instantly share code, notes, and snippets.

@timjb
Created July 6, 2016 23:29
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 timjb/eb0f38f71e7cfb0c79e0b7c3ce8f876a to your computer and use it in GitHub Desktop.
Save timjb/eb0f38f71e7cfb0c79e0b7c3ce8f876a to your computer and use it in GitHub Desktop.
{-# LANGUAGE ExplicitForAll #-}
module WorksOnlyWithoutScopedTypeVariables where
myMap :: forall a b. (a -> b) -> [a] -> [b]
myMap = myMapWithSwappedVariables
where
myMapWithSwappedVariables :: (b -> a) -> [b] -> [a]
myMapWithSwappedVariables = fmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment