Skip to content

Feature Request: Get half the combinations #1

@jauggy

Description

@jauggy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions