[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Binary Search Using Lambda

Jason Merrill

9/5/2006 12:58:00 PM

As an aside, I would be warry of building functions that return array
indices, or -1 if they fail. In ruby, -1 is a valid array index,
referring to the last element in the array. Might be better to return
nil to avoid later mistakes and confusion.

Jason