: (=permutation-static-array) ( -- array ) { 0 1 2 3 4 5 6 7 8 9 } ; inline : =permutation ( x y -- ? ) (=permutation-static-array) { [ [ drop 0 ] change-each ] [ '[ 10 /mod _ [ 1+ ] change-nth dup 0 > ] loop drop ] [ '[ 10 /mod _ [ 1- ] change-nth dup 0 > ] loop drop ] [ ] } cleave [ 0 = ] all? ;