Fix indentation
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module Day02
|
||||
( day02_1,
|
||||
day02_2
|
||||
day02_2,
|
||||
)
|
||||
where
|
||||
|
||||
@@ -17,11 +17,11 @@ sumInvalid = foldl addInvalid 0
|
||||
|
||||
sumInvalid' :: [Int] -> Int
|
||||
sumInvalid' = foldl addInvalid 0
|
||||
where addInvalid acc n
|
||||
where
|
||||
addInvalid acc n
|
||||
| let s = drop 1 $ show n ++ show n, show n `isInfixOf` take (length s - 1) s = acc + n
|
||||
| otherwise = acc
|
||||
|
||||
|
||||
getRange :: String -> [Int]
|
||||
getRange r = [read (takeWhile (/= '-') r) .. read $ drop 1 (dropWhile (/= '-') r)]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Day03
|
||||
( day03_1,
|
||||
day03_2
|
||||
day03_2,
|
||||
)
|
||||
where
|
||||
|
||||
|
||||
Reference in New Issue
Block a user