born Posted September 26, 2023 Posted September 26, 2023 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
opmo Posted September 26, 2023 Posted September 26, 2023 (cartesian '((1 2) (3 4) (5 6) (7 8))) Quote
born Posted September 26, 2023 Author Posted September 26, 2023 Perfect. I missed this one ... Thanks a lot. Achim Quote
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.