Last active
January 1, 2016 08:28
-
-
Save lgastako/8117999 to your computer and use it in GitHub Desktop.
Haskell implementation of https://gist.github.com/amontalenti/8114359 from a non-haskell programmer.
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
module Main where | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
main = let someItems = [1, 2, 3, 4] | |
someMapping = Map.fromList [ ("ST", "started") | |
, ("IP", "in progress") | |
, ("DN", "done") | |
] | |
in do mapM_ (putStrLn . show) someItems | |
mapM_ (putStrLn . format) (Map.toList someMapping) | |
where format (k, v) = k ++ " => " ++ v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment