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?
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:
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?