Fix indentation

This commit is contained in:
Daniele Fucini
2025-12-07 17:25:44 +01:00
parent fce0075c71
commit 0a88551cb2

View File

@@ -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)