Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: When would you use functional programming?

by Dominus (Parson)
on Oct 18, 2002 at 17:15 UTC ( #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
Node Status?
node history
Node Type: note [id://206368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-08-21 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (128 votes), past polls