Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 15 lines (13 sloc) 0.286 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
class Array {
  def quicksort {
    match size {
      case 0 -> self
      case _ ->
        (rest select: @{ < first } . quicksort) + [first] + (rest select: @{ >= first } . quicksort)
    }
  }
}

(1..10) map: { 100 random } . tap: @{
  inspect println
  quicksort inspect println
}
Something went wrong with that request. Please try again.