How can I get a slice of an array, e.g. (in python I would write) [1,2,3,4][0:2]
to get [1,2]
In SC:
[1, 2, 3, 4][0..1]
Or even shorter:
[1, 2, 3, 4][..1]
Similarly you can get the last two indices with either
[1, 2, 3, 4][2..3]
or
[1, 2, 3, 4][2..]