Scala non-consecutive sub-array
arrays, scala, slice
Solution
The shortest line using only standard library functions I can think of would be
Array(4, 1, 5) map "zero|one|two|three|four|five".split("\\|")
Problem
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) ```