each-permutation ( ... seq quot: ( ... elt -- ... ) -- ... ) (original) (raw)
each-permutation ( ... seq quot: ( ... elt -- ... ) -- ... )
Vocabulary
math.combinatorics
Inputs
seq | a sequence |
---|---|
quot | a quotation with stack effect ( ... elt -- ... ) |
Outputs
None
Word description
Applies the quotation to each permutation of seq in order.
Definition
USING: math.combinatorics.private sequences ;
: each-permutation
( ... seq quot: ( ... elt -- ... ) -- ... )
permutations-quot each ; inline