Scala By Example を読みます。 資料: http://www.scala-lang.org/docu/files/ScalaByExample.pdf 1. Introduction いんとろだくしょん 2. A First Example imperative に書いたクイックソートの例。 def sort(xs: Array[Int]) { def swap(i: Int, j: Int) { val t = xs(i); xs(i) = xs(j); xs(j) = t } def sort1(l: Int, r: Int) { val pivot = xs((l + r) / 2) var i = l; var j = r while (i <= j) { while (xs(i) < pivot) i += 1 while (xs(j) > pivot) j -=