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: array of integers
by Mike Fletcher other posts by this author
Oct 31 2006 6:12AM messages near this date
array of integers | Re: array of integers
Brad Tilley wrote:
>  What is the best way to get determine the largest and smallest int in an 
>  array of ints? For example:
>  
>  x = [1,2,3,4]
> 

puts x.max
puts x.min

See the documentation for Enumerable (try "ri Enumerable" at your 
prompt).

-- 
Posted via http://www.ruby-forum.com/.
Thread:
Brad Tilley
Mike Fletcher

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved