# 8a0b4ed63c3c370fd194b4a1ba0c39073abd3af244d0ca98acdd40d2153743fe Elan 2.0.0-alpha valid

function sort(li as List<of String>) returns List<of String>
  variable result set to li
  variable len set to li.length()
  if len > 1 then
    variable mid set to (len/2).floor()
    variable frontHalf set to sort(li.subList(0, mid))
    variable backHalf set to sort(li.subList(mid, li.length()))
    assign result to merge(frontHalf, backHalf)
  end if
  return if_(len > 1, merge(sort(frontHalf(li)), sort(backhalf(li))), li)
end function
