ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: scramble sentence, how to better program?
by 7stud -- other posts by this author
May 8 2008 3:17PM messages near this date
Re: scramble sentence, how to better program? | Re: scramble sentence, how to better program?
S2 wrote:
>  David A. Black wrote:
>  
> > print "Enter a sentence: "
> > puts gets.split.sort_by { rand }.join(" ")
>  
>  but does this take into account that rand could generate the same numer 
>  two
>  times? while that is not likely, it could happen.

So what?

-- 
Posted via http://www.ruby-forum.com/.
Thread:
Globalrev
David A. Black
S2
S2
Globalrev
S2
7stud --
David A. Black
Rob Biedenharn
S2
S2

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved