Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: TIMTOWTDI and other languages

by broquaint (Abbot)
on Apr 28, 2002 at 22:45 UTC ( #162724=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    alphas = [9, 4, 3, 2, 22,  13, 7,  140, 95, 278]
    betas  = [8, 3, 4, 1, 278, 94, 15, 7,   19, 200]
    result = (alphas & betas).sort
    
  2. or download this
    alphas = [9, 4, 3, 2, 22,  13, 7,  140, 95, 278]
    betas  = [8, 3, 4, 1, 278, 94, 15, 7,   19, 200]
    ...
            result.append(x)
    
    result.sort()
    
  3. or download this
    result = filter(lambda y: y != 0, [x in betas and x for x in alphas])
    result.sort()
    
  4. or download this
    @result = sort { $a <=> $b }
              map  { my $x = $_; grep $x == $_, @betas } @alphas;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-07 00:57 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 (86 votes), past polls