From: "Brian Schröder" Date: 2004-12-16T21:08:20+09:00 Subject: Re: P2P application in 15 lines of Python posted on slashdot On Thu, 16 Dec 2004 18:51:38 +0900 Nikolai Weibull wrote: > * gabriele renzi [Dec 16, 2004 10:30]: > > def qs(l) > > return [] if (x,*xs=*l).empty? > > less, more = xs.partition{|y| y < x} > > qs(less) + [x] + qs(more) > > end > > > algoritm suggestions are welcome :) > > How about > > def qs(l) > l.sort! > end > > ;-), > nikolai > I hope sort is not implemented as quicksort ;) Regards, Brian -- Brian Schr�der http://www.brian-schroeder.de/