Skip to content

Commit

Permalink
Day_22(2023): fixed bracket spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheinxy committed Dec 22, 2023
1 parent a8e51a4 commit 2cf9adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 2023/Day_22/Day_22.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Output = Int
fallDown :: [Brick] -> M.Map Int Brick
fallDown = foldl' go M.empty
where ground = S.singleton (-1) -- Singleton for bricks supported only by the ground
go fall cur | z == 0 = M.insert i (cur { minZ=z+1 , maxZ=mz+1 , cubes=backCubes, supporting=ground}) fall -- Touched the ground
go fall cur | z == 0 = M.insert i (cur { minZ=z+1 , maxZ=mz+1 , cubes=backCubes, supporting=ground }) fall -- Touched the ground
| null touching = go fall (cur { minZ=z+dz, maxZ=mz+dz, cubes=nextCubes }) -- Touched no bricks
| otherwise = M.insert i (cur { minZ=z+1 , maxZ=mz+1 , cubes=backCubes, supporting=touching }) fall
where i = M.size fall -- The index for the current brick
Expand Down

0 comments on commit 2cf9adb

Please sign in to comment.