Fix SortedSet syntax

This commit is contained in:
Aly 2020-12-04 21:50:41 -08:00
parent c3ec6c5c25
commit e2ab0d7b37

View file

@ -28,7 +28,7 @@ object Day5 extends Day:
(lines: Stream[F, String]) => {
val sortedSeats: F[SortedSet[Seat]] =
lines.through(seats[F])
.compile.to(Collector.supportsFactory(SortedSet.evidenceIterableFactory[Seat]))
.compile.to(Collector.supportsFactory(SortedSet))
val pairs: Stream[F, (Seat, Seat)] =
Stream.eval(sortedSeats)
.flatMap(seats => Stream.fromIterator[F](seats.sliding(2).map(set => (set.min, set.max)), 1))