We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a870bc commit d46af18Copy full SHA for d46af18
src/main/scala/ScalaPlayground/Lift/Immutable/LiftImmutable.scala
@@ -42,8 +42,7 @@ case class Lift(
42
def nearestPassengerTarget: Option[Floor] =
43
people.filter(_.matchesDirection(this)).map(_.destination).minByOption(floor => Math.abs(floor - position))
44
45
- @tailrec
46
- final def pickup(building: Building): (Lift, Building) =
+ @tailrec final def pickup(building: Building): (Lift, Building) =
47
val queue = building.floors(position)
48
queue.filter(accepts).dequeueOption match
49
case None => (this, building)
0 commit comments