Which are the differences between scan
and scanLeft
?
For instance,
(1 to 3).scan(10)(_-_)
res: Vector(10, 9, 7, 4)
(1 to 3).scanLeft(10)(_-_)
res: Vector(10, 9, 7, 4)
deliver the same result, clearly in contrast to
(1 to 3).scanRight(10)(_-_)
res: Vector(-8, 9, -7, 10)