drop과 take의 조합을 보고하고 slice로 바꿉니다.
drop
take
slice
예:
var x: Seq[Int] x.drop(n).take(m) x.take(m).drop(n)
빠른 수정 적용 후:
var x: Seq[Int] x.slice(n, n + m) x.slice(n, m)