Oop
This commit is contained in:
parent
e533ce8c6e
commit
9bb30739a2
6
app/3.hs
6
app/3.hs
@ -6,9 +6,9 @@ import Data.List.Split
|
||||
|
||||
e :: [String] -> [(Int,Int)]
|
||||
e = ((\case
|
||||
[a,b] -> (read a, read b)
|
||||
err -> error $ "Parsing failed on: " ++ show err
|
||||
) . splitWhen (== ',') . init . drop 4 <$>)
|
||||
[a,b] -> (read a, read b)
|
||||
err -> error $ "Parsing failed on: " ++ show err
|
||||
) . splitWhen (== ',') . init . drop 4 <$>)
|
||||
|
||||
parse1 :: String -> [(Int,Int)]
|
||||
parse1 = e . getAllTextMatches . (=~ "mul\\([[:digit:]]+,[[:digit:]]+\\)")
|
||||
|
Loading…
Reference in New Issue
Block a user