From: "Haris Bogdanović" Date: 2009-07-13T18:50:05+09:00 Subject: Re: one line sorting def quick_sort(array) return array if array.length <=1 pivot=array[array.length/2] return quick_sort(array.select {|i| ipivot}) end I hope that's pure functional version of quick sort. No list is changed but how many temporary lists are created before the final result comes up ? I guess that's job for garbage collector. And I doubt this could be closer to one line as it is.