numStrs <- readFile dataFileName
let fuels = fmap readSnafu $ lines numStrs
putStrLn $ showSnafu $ sum fuels
- -- print $ part1 fuels
readSnafu :: String -> Int
readSnafu cs = foldl' go 0 cs
packSnafu digits
| carry == 0 = shown
| otherwise = (snafuRep carry) : shown
- where (carry, shown) = foldl' packSnafuDigit (0, "") digits
+ where (carry, shown) = foldl' packSnafuDigit (0, "")
packSnafuDigit :: (Int, String) -> Int -> (Int, String)
packSnafuDigit (carry, acc) d