I'm new to Scala. I see that there's a slice method for Arrays that can return a consecutive slice, like so:
scala> "zero|one|two|three|four|five".split("\\|").slice(2,5)
res3: Array[String] = Array(two, three, four)
Is there syntactic sugar somewhere for taking an arbitrary, non-consecutive, non-ascending sub-array? Something like:
scala> "zero|one|two|three|four|five".split("\\|").fictionalMethod(4,1,5)
res3: Array[String] = Array(four, one, five)