math.combinators: Add map-permutation
parent
161cd8222c
commit
229d0e0549
|
@ -55,6 +55,10 @@ PRIVATE>
|
||||||
[ [ length factorial iota ] keep ] dip
|
[ [ length factorial iota ] keep ] dip
|
||||||
'[ _ permutation @ ] each ; inline
|
'[ _ permutation @ ] each ; inline
|
||||||
|
|
||||||
|
: map-permutation ( seq quot -- )
|
||||||
|
[ [ length factorial iota ] keep ] dip
|
||||||
|
'[ _ permutation @ ] map ; inline
|
||||||
|
|
||||||
: reduce-permutations ( seq identity quot -- result )
|
: reduce-permutations ( seq identity quot -- result )
|
||||||
swapd each-permutation ; inline
|
swapd each-permutation ; inline
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue