Get all possible combinations of elements in a set.
Examples:
combinations([1, 2, 3]) // [[1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]combinations([1]) // [[1]] Copy
combinations([1, 2, 3]) // [[1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]combinations([1]) // [[1]]
Array of objects of any type. They are treated as unique.
Array of arrays representing all possible non-empty combinations of elements in a set.
Get all possible combinations of elements in a set.
Examples: