Not specifically "software" but this piece of Haskell code is the most beautiful code I've ever seen:
quicksort [] = []
quicksort (x:xs) = quicksort [y|y<-xs,y<x] ++ [x] ++ quicksort [y|y<-xs,y>=x]