Skip to content

Instantly share code, notes, and snippets.

@dripolles
Created March 13, 2014 12:52
Show Gist options
  • Save dripolles/9527910 to your computer and use it in GitHub Desktop.
Save dripolles/9527910 to your computer and use it in GitHub Desktop.
1HaskellADay 2014/03/13
-- See http://codepad.org/gXEcCgBI
import Control.Applicative
pairToList :: (a,a) -> [a]
pairToList = (:) <$> fst <*> replicate 1 . snd
main = print $ pairToList (1,2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment