all-subsets ( seq -- subsets )


Vocabulary
math.combinatorics

Inputs
seqa sequence


Outputs
subsetsa sequence


Word description
Returns all the subsets of a sequence.

Examples
USING: math.combinatorics prettyprint ; { 1 2 3 } all-subsets .
{ { } { 1 } { 2 } { 3 } { 1 2 } { 1 3 } { 2 3 } { 1 2 3 } }


Definition