From: dblack@... Date: 2006-01-13T02:13:33+09:00 Subject: Re: Important Algorithm Finally Ported. Hi -- On Fri, 13 Jan 2006, Hampton wrote: > After months of work, gruelling hours, and a nice cup of coffee, the > world's most famous (and infamous) algorithm has been ported to the > ruby language! > > {applause} > > Thank you, thank you. > > The Slim Shady algorithm is a deceptively simple algorithm which finds > use in many many aerospace and bio-informatics systems. Therefore, Ruby > may now stand proud as.... a..... ummm.... language to do those things. > > Here is the algorithm... > > def slim_shady_finder homies > homies.each do |some_guy| > return some_guy if (some_guy.name.eql? "Slim Shady") > end > return nil > end I have no idea what you're talking about, but you've triggered my code-massaging compulsion :-) def slim_shady_finder(homies) homies.find {|h| h.name.eql?("Slim Shady") } end David -- David A. Black dblack@wobblini.net "Ruby for Rails", from Manning Publications, coming April 2006! http://www.manning.com/books/black