Fix indentation
This commit is contained in:
16
src/Day07.hs
16
src/Day07.hs
@@ -45,11 +45,13 @@ beamSplitRecursive start = do
|
||||
else
|
||||
if grid !! fst start !! snd start == 'S' || grid !! fst start !! snd start == '.'
|
||||
then beamSplitRecursive (fst start + 1, snd start)
|
||||
else if grid !! fst start !! snd start == 'x' then return ()
|
||||
else do
|
||||
mark start
|
||||
beamSplitRecursive (fst start, snd start - 1)
|
||||
beamSplitRecursive (fst start, snd start + 1)
|
||||
else
|
||||
if grid !! fst start !! snd start == 'x'
|
||||
then return ()
|
||||
else do
|
||||
mark start
|
||||
beamSplitRecursive (fst start, snd start - 1)
|
||||
beamSplitRecursive (fst start, snd start + 1)
|
||||
|
||||
beamSplit :: State Grid ()
|
||||
beamSplit = do
|
||||
@@ -62,5 +64,5 @@ day07_1 = do
|
||||
input <- parseInput
|
||||
let grid = execState beamSplit input
|
||||
putStrLn $
|
||||
"Day 7, Puzzle 1 solution: "
|
||||
++ show (length $ concatMap (filter (== 'x')) grid)
|
||||
"Day 7, Puzzle 1 solution: "
|
||||
++ show (length $ concatMap (filter (== 'x')) grid)
|
||||
|
||||
Reference in New Issue
Block a user