Skip to content

Instantly share code, notes, and snippets.

@ishiy1993
Created November 24, 2016 05:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishiy1993/926be63c872f764afbc5e1d16a70b045 to your computer and use it in GitHub Desktop.
Save ishiy1993/926be63c872f764afbc5e1d16a70b045 to your computer and use it in GitHub Desktop.
main = do
ds <- lines <$> getContents
print $ map solve ds
solve :: String -> (String,String)
solve str = (key, value)
where
key = takeWhile (/=':') str
value = tail $ dropWhile (/=':') str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment