Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

TIMTOWTDI, synergy

by John M. Dlugosz (Monsignor)
on Jun 02, 2009 at 18:49 UTC ( #767727=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub max (::Type *$first,  Type *@rest --> Type) { ... }
    
  2. or download this
    sub max (
       ::Type *$first,  Type *@rest # one or more values in list context
       :&compare:(Type $, Type $ --> Bool) = &[less]   # function, with de
    +fault
       --> Type)   # returns the same type as the arguments
    { ... }
    
  3. or download this
    my $comp = { length($^left) > length($^right) }
    my $result = max @values :compare<$comp>;    # use adverb syntax
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://767727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2015-07-30 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls