Sorting algorithms/Bubble sort: Difference between revisions

Line 3,356:
}</lang>
 
<lang scala>defimport bubbleSort(xt: List[Int]) = {scala.annotation.tailrec
 
def bubbleSort(xt: List[Int]) = {
@tailrec
def bubble(xs: List[Int], rest: List[Int], sorted: List[Int]): List[Int] = xs match {