Skip to content

Instantly share code, notes, and snippets.

@jeovazero
Created March 2, 2022 12:31
Show Gist options
  • Save jeovazero/ae6e368151916504693e48e65f797c37 to your computer and use it in GitHub Desktop.
Save jeovazero/ae6e368151916504693e48e65f797c37 to your computer and use it in GitHub Desktop.
{-# LANGUAGE Rank2Types #-}
mapPair :: (forall x. x -> x) -> (a,b) -> (a,b)
mapPair f (a, b) = (f a, f b)
id' :: forall x. x -> x
id' x = x
main = print $ mapPair id' (1, 'a')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment