Skip to content

Commit

Permalink
Day_22(2023): use delete to delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheinxy committed Dec 22, 2023
1 parent 2f93530 commit 8113823
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 @@ -55,7 +55,7 @@ parseInput :: String -> Input
parseInput = fallDown . sort . map read . lines

getUnremovableBricks :: Input -> S.Set Int
getUnremovableBricks = S.filter (-1 /=) . M.foldr go S.empty
getUnremovableBricks = S.delete (-1) . M.foldr go S.empty
where go cur acc | (S.size . supporting) cur == 1 = acc `S.union` supporting cur
| otherwise = acc

Expand Down

0 comments on commit 8113823

Please sign in to comment.