projects
/
advent-of-code-22.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49b6bfb
)
More tidying
author
Neil Smith
<NeilNjae@users.noreply.github.com>
Thu, 8 Dec 2022 20:23:06 +0000
(22:23 +0200)
committer
Neil Smith
<NeilNjae@users.noreply.github.com>
Thu, 8 Dec 2022 20:23:06 +0000
(22:23 +0200)
advent08/Main.hs
patch
|
blob
|
history
diff --git
a/advent08/Main.hs
b/advent08/Main.hs
index e822fc278098418b6809c3b9fc9e1978a452de1d..6bbf06a34fc5f46d42160ad926da0c0c0c8b8f80 100644
(file)
--- a/
advent08/Main.hs
+++ b/
advent08/Main.hs
@@
-14,14
+14,8
@@
main =
do dataFileName <- getDataFileName
text <- readFile dataFileName
let forest = fmap (fmap readTree) $ lines text
- -- print forest
- -- print $ setVisibilityOrient forest
- -- print $ setVisibilityForest forest
- -- print $ countVisible $ setVisibilityForest forest
print $ part1 forest
print $ part2 forest
- -- print $ part1 sizedTree
- -- print $ part2 sizedTree
part1, part2 :: Forest -> Int
part1 = countVisible . setVisibilityForest