Exactly, and to provide another example, this time in Haskell. The quicksort that serves as a model for the code in my original node:
qsort  = 
qsort (x:xs) = qsort elts_lt_x ++ [x] ++ qsort elts_greq_x
elts_lt_x = [y | y <- xs, y < x]
elts_greq_x = [y | y <- xs, y >= x]
I really like the short and concise way this expresses the quicksort algorithm in almost mathematical notation. Although math was never my strong point, this way of talking about sets and their behaviour is in my opinion very powerful. Take a look at this node for some examples that are a bit closer to home.
Mischief. Mayhem. Soap.