Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
→{{header|Scala}}
Line 3,357:
<lang scala>def bubbleSort(xt: List[Int]) = {
@tailrec
def bubble(xs: List[Int], rest: List[Int], sorted: List[Int]): List[Int] = xs match {
case x :: Nil =>
|