selections ( seq n -- selections )


Vocabulary
math.combinatorics

Inputs and outputs
seqa sequence
nan integer
selectionsa sequence


Word description
Returns all the ways to take n (possibly the same) items from the sequence of items.

Examples
USING: math.combinatorics prettyprint ; { 1 2 } 2 selections .
{ { 1 1 } { 1 2 } { 2 1 } { 2 2 } }


Definition