Skip to content

Commit

Permalink
homework-2: improving clarity of parse function
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Nakandakari committed Feb 12, 2015
1 parent a94fb2e commit 4c24712
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions homework-2/LogAnalyzer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ parseMessage m = case (words m) of
s -> Unknown m

parse :: String -> [LogMessage]
parse s = let ls = lines s
in map (parseMessage) ls
parse = map parseMessage . lines

-- Putting the logs in order

Expand Down

0 comments on commit 4c24712

Please sign in to comment.