Fix SortedSet syntax
This commit is contained in:
parent
c3ec6c5c25
commit
e2ab0d7b37
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ object Day5 extends Day:
|
||||||
(lines: Stream[F, String]) => {
|
(lines: Stream[F, String]) => {
|
||||||
val sortedSeats: F[SortedSet[Seat]] =
|
val sortedSeats: F[SortedSet[Seat]] =
|
||||||
lines.through(seats[F])
|
lines.through(seats[F])
|
||||||
.compile.to(Collector.supportsFactory(SortedSet.evidenceIterableFactory[Seat]))
|
.compile.to(Collector.supportsFactory(SortedSet))
|
||||||
val pairs: Stream[F, (Seat, Seat)] =
|
val pairs: Stream[F, (Seat, Seat)] =
|
||||||
Stream.eval(sortedSeats)
|
Stream.eval(sortedSeats)
|
||||||
.flatMap(seats => Stream.fromIterator[F](seats.sliding(2).map(set => (set.min, set.max)), 1))
|
.flatMap(seats => Stream.fromIterator[F](seats.sliding(2).map(set => (set.min, set.max)), 1))
|
||||||
|
|
Loading…
Reference in a new issue