Skip to content

Instantly share code, notes, and snippets.

@yudetamago
Last active August 29, 2015 14:07
Show Gist options
  • Save yudetamago/f4a04ceb831287b7df7c to your computer and use it in GitHub Desktop.
Save yudetamago/f4a04ceb831287b7df7c to your computer and use it in GitHub Desktop.
ps = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]
mapVer = unlines $ map (unwords . map show) ps
monadVer = unlines $ map unwords $ ps >>= return . map show
listComprehensionVer = unlines $ map unwords [map show x | x <- ps]
{-
1 2 3 4
5 6 7 8
9 10 11 12
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment