Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 scrutinizing the Monastery: (13)
As of 2015-07-01 21:46 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 (22 votes), past polls