6
scan
과 scanLeft
의 차이점은 무엇입니까? 예컨대 Scala에서 scan과 scanLeft의 차이점
(1 to 3).scan(10)(_-_)
res: Vector(10, 9, 7, 4)
(1 to 3).scanLeft(10)(_-_)
res: Vector(10, 9, 7, 4)
기본적
(1 to 3).scanRight(10)(_-_)
res: Vector(-8, 9, -7, 10)