updated day 4

This commit is contained in:
toastyandwarm 2024-12-05 15:10:43 +00:00
parent 4192baf89c
commit 3262389afe

View file

@ -30,9 +30,6 @@ split delims (x:xs)
toTuple :: [a] -> (a, a)
toTuple (x:(y:ys)) = (x, y)
fromTuple :: (a, a) -> [a]
fromTuple (x, y) = [x, y]
splitInput :: String -> [(Integer, Integer)]
splitInput text = map (\x -> toTuple $ map read x) $ map (filter (/="")) $ map (split ['|']) $ split ['\n'] text