Skip to content

Instantly share code, notes, and snippets.

@AphonicChaos
Created February 8, 2016 19:15
Show Gist options
  • Save AphonicChaos/1a6b3858f4b9f83c8957 to your computer and use it in GitHub Desktop.
Save AphonicChaos/1a6b3858f4b9f83c8957 to your computer and use it in GitHub Desktop.
module Main where
g :: (a -> b) -> [a] -> [b]
g f (x:xs) = [f x]
main = print $ g (+1) [1, 2, 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment