combinations

fun <T> Set<T>.combinations(size: Int): Set<Set<T>>

Returns all possible subsets of this with size.

Receiver

the set for which all possible subsets with size are constructed

Return

all possible subsets of provided size

Parameters

size

the number of elements per combination