let F# = succinct

November 11th, 2008

A while ago Luke Hoban from Microsoft gave a presentation on F#. I started reading the F# book by Don Syme and the word that was often used to describe the language in both the book and the presentation was “succinct”.

I decided to test the succinctness of it and here is my implementation of Quick Sort in F#

 let rec quickSort sequence =
  match sequence with
  | [] -> sequence
  | x :: t -> List.partition (fun a -> a < x) t |> (fun (a,b) -> quickSort a @ x :: quickSort b)

Pretty Succinct!

One Response to “let F# = succinct”

  1. Getting started with F# : read a book! » Lab49 Blog Says:

    [...] let F# = succinct [...]