Natural Sorting Algorithm in Scala