Skip to content

the thinkpod

where I think out loud

Menu
  • Timeline
Menu

First impression of Scala

Posted on September 20, 2012 by milad

Even though generally speaking, I am against choosing symbolic programming over verbose and well-readable code, I have to admit that this code snippet taken from the Wikipedia entry on Scala is nothing short of beautiful:

def qsort(list: List[Int]): List[Int] = list match {
  case Nil => Nil
  case pivot :: tail => {
    val (smaller, rest) = tail.partition(_ < pivot)
    qsort(smaller) ::: pivot :: qsort(rest)
  }
}

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I’m a tinkerer and engineer. Here, I write about all sorts of things.

Tags

administration algorithms application bash command blog book client clrs code cormen courses Data Structures domain eyeos firefox google google interview google interview series 1 google interview series 2 hello world host interview interview preparation java job learning linux mac phone screen poem Poetry preparation programming Projects repository Review script shell spring synopsis system management user management video windows 7 writing

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2022 the thinkpod | Built using WordPress and Responsive Blogily theme by Superb