Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Number Combinations With Replacement

by lemming (Priest)
on Apr 18, 2002 at 19:30 UTC ( #160315=note: print w/ replies, xml ) Need Help??


in reply to Number Combinations With Replacement

Wouldn't feeding the permute function with like arguments give what you want? print "[", join(", ", @$_), "]\n" for permute([1,2], [1,2]);
has this for output:

[1, 1] [1, 2] [2, 1] [2, 2]


Comment on Re: Number Combinations With Replacement
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-12-18 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls