Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: When would you use functional programming?

by Dominus (Parson)
on Oct 18, 2002 at 17:15 UTC ( [id://206368]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      qsort []     = []
      qsort (x:xs) = qsort elts_lt_x ++ [x] ++ qsort elts_gr_x
                       where
                         elts_lt_x   = [y | y <- xs, y < x]
                         elts_gr_x = [y | y <- xs, y > x]
    
  2. or download this
          ($minimum) = sort {$a <=> $b} @items;
    
  3. or download this
        minimum = head(qsort array);
    
  4. or download this
        sub zero {
          return 0;
        }
    
        $x = zero(SOME_VERY_LONG_COMPLICATED_EXPRESSION);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found