public native sortNew() as Array<T>
Returns a sorted copy without modifying the current array.
import klyn.collections values as Int[] = Int[2] values[0] = 2 values[1] = 1 sorted = values.sortNew() print(sorted) # f:[1, 2] print(values) # f:[2, 1]
A new array with the same fixed size and sorted elements.