If the array you want to sort is variable(A) you use: sorted array(variable(A), current array element)