born Posted September 26 Share Posted September 26 Has anybody an idea how to formalize the following task? A list of 4 sublists with 2 elements: '((1 2) (3 4) (5 6) (7 8))) ==> All the possible combinations of either one or the other number in the sublist: '( (1 3 5 7) (1 4 5 7) (1 3 6 7) (1 4 6 7) (1 3 5 8) (1 4 5 8) (1 3 6 8) (1 4 6 8) (2 3 5 7) (2 4 5 7) (2 3 6 7) (2 4 6 7) (2 3 5 8) (2 4 5 8) (2 3 6 8) (2 4 6 8) ) Did I miss a combination? Thanks for help. Achim Quote Link to comment Share on other sites More sharing options...
opmo Posted September 26 Share Posted September 26 (cartesian '((1 2) (3 4) (5 6) (7 8))) Quote Link to comment Share on other sites More sharing options...
born Posted September 26 Author Share Posted September 26 Perfect. I missed this one ... Thanks a lot. Achim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.