each-unique-permutation ( ... seq quot: ( ... elt -- ... ) -- ... ) (original) (raw)
each-unique-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 unique permutation of seq in order.
Definition
USING: kernel math.combinatorics.private sequences ;
: each-unique-permutation
( ... seq quot: ( ... elt -- ... ) -- ... )
[ 0 over length ] dip unique-permutations ; inline