proc sort . d[] .
   for i = 1 to len d[] - 1
      for j = i + 1 to len d[]
         if d[j] < d[i]
            swap d[j] d[i]
         .
      .
   .
.
func jortsort arr[] .
   orig[] = arr[]
   sort arr[]
   return if orig[] = arr[]
.
print jortsort [ 2 4 6 ]
print jortsort [ 4 2 6 ]
