Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

cross combinations

by jql (Acolyte)
on Oct 28, 2005 at 08:25 UTC ( [id://503589]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    (quoted from Darren)
    
    ...
      cross([1,2],[3]); # yields ([1,3],[2,3])
      cross([1],[2],[3]) # yields ([1,2,3])
      cross([1],[2],[3,4]) # yields ([1,2,3],[1,2,4])
    
  2. or download this
    sub cross {
        my @list = @_.reverse or return;
    ...
            }
        }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-24 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found