Skip to content

Instantly share code, notes, and snippets.

@myme
Last active December 22, 2015 15:49
Show Gist options
  • Save myme/6495137 to your computer and use it in GitHub Desktop.
Save myme/6495137 to your computer and use it in GitHub Desktop.
import Data.Text (Text, pack, unpack)
tables :: [Maybe Text]
tables = [ Just $ pack "Foo"
, Just $ pack "Bar"
, Nothing
, Just $ pack "Baz"
]
main :: IO ()
main = sequence_ $ do
foo <- tables
let output = case foo of
Nothing -> "Nothing"
Just a -> unpack a
return $ putStrLn output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment