From: Robert Dober Date: 2007-02-13T06:48:07+09:00 Subject: Re: [QUIZ] One-Liners (#113) ------=_Part_72298_9334623.1171316879443 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 2/12/07, Krishna Dole wrote: > Looking at others' solutions, I really like Robert Dober's > sort_by{rand} solution to the array shuffle. That is kind of you but there is a funny story behind it. Many others came up with it and it is a known idiom. But yet I got so confused that I failed to post this solution. I was about to post, DO NOT LAUGH sort{ rand <=> rand} (which works BTW) and eventually there was a thread about the issue and I (not even so kindly) asked the people to wait for the spoiler period and it was my full intention to tell them later that sort_by { rand } was stupid when I found out -in time- that sort {rand} was stupid and not sort_by{ rand }. Actually I really do not deserve credit for this one. Cheers Robert -- We have not succeeded in answering all of our questions. In fact, in some ways, we are more confused than ever. But we feel we are confused on a higher level and about more important things. -Anonymous ------=_Part_72298_9334623.1171316879443--