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

Re: cross combinations

by Courage (Parson)
on Nov 02, 2005 at 18:33 UTC ( #505047=note: print w/ replies, xml ) Need Help??


in reply to cross combinations

I beleive Perl6's solution could be as concise and lazy as Haskell's one:

[(x,y)|x<-[1,2],y<-[3,4]]
... reesults in (when running in GHCi)
[(1,3),(1,4),(2,3),(2,4)]


Comment on Re: cross combinations
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2015-07-06 21:40 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 (83 votes), past polls