Created
March 13, 2014 12:52
-
-
Save dripolles/9527910 to your computer and use it in GitHub Desktop.
1HaskellADay 2014/03/13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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