Your second expression is almost what I had in mind. However, a set of dominoes has only 28 pieces. Now remove the duplicates.
Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Skip Cave Sent: Sunday, October 05, 2014 1:30 PM To: [email protected] Subject: Re: [Jprogramming] Dominate the Dominoes I put the odometer function in a separate verb, in order to point out how you could use it to create all the combinations of dominoes. If you want each 2-number domino boxed, you can do this: 1 < ;. 2 |: |:49 2$(,7 7#:i.49){dice If you want all the dominoes boxed up in a nice big box, then this: < 7 7 $ 1 < ;. 2 |: |:49 2$(,7 7#:i.49){dice Skip ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
