# c2817ece7e2e822c8e26a6cd901378143b5a8c93686dd84fab950be30388d422 Elan 2.0.0-alpha valid

function merge(a as List<of String>, b as List<of String>) returns List<of String>
  variable result set to new List<of String>()
  if a.length() is 0 then
    set result to b
  elif b.length() is 0 then
    set result to a
  elif a[0].isBefore(b[0]) then
    # set result to .subList(a[0]].withAppendList(merge(a[1, .length()), b))
  else
    # set result to .subList(b[0]].withAppendList(merge(a, b[1, .length())))
  end if
  return result
end function
