Skip to content

Commit b548eab

Browse files
committed
Day 6: part 1 cleanup
1 parent e6c1f8f commit b548eab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/scala/Day06.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ object Day06:
107107
)
108108

109109
def allDistinctGuardPositionsCount: Int =
110-
List
110+
Set
111111
.unfold(init = toStore)(store => store.getGuard.map(guard => (guard.pos, store.afterGuardStep)))
112-
.distinct
113-
.length
112+
.size
114113

115114
object Lab:
116115

0 commit comments

Comments
 (0)