Garden 🌻

List::slice()

Return a new list consisting of the items from index i (inclusive) to index j (exclusive). If j is negative, count backwards from the end.

Example
[10, 11, 12].slice(0, 2) //-> [10, 11]
[10, 11, 12].slice(1, -1) //-> [11]
Source Code
public method slice<T>(this: List<T>, i: Int, j: Int): List<T> {
  __BUILT_IN_IMPLEMENTATION
}