Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Get half the combinations #1

Open
jauggy opened this issue Jul 13, 2024 · 0 comments
Open

Feature Request: Get half the combinations #1

jauggy opened this issue Jul 13, 2024 · 0 comments

Comments

@jauggy
Copy link

jauggy commented Jul 13, 2024

So the scenario I have is that I have a list of players and I want to create two teams of equal size from this list. If I have 4 players then then I could use combination:

1..4 |> Combination.combine(2)

However this gives twice the number of valid configurations since
Team1: [1,2]
Team2: [3,4]

Is the same as
Team1: [3,4]
Team2: [1,2]

Would it be possible to get a function that only gives the first half of the combination results?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant