Fix usages of nths

db4
Slava Pestov 2008-09-12 18:15:22 -05:00
parent 10c68ebb21
commit 379566374c
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ PRIVATE>
twiddle [ nPk ] keep factorial / ;
: permutation ( n seq -- seq )
tuck permutation-indices nths ;
tuck permutation-indices swap nths ;
: all-permutations ( seq -- seq )
[

View File

@ -9,7 +9,7 @@ IN: project-euler.186
55 [1,b] [ (generator) ] map <circular> ;
: advance ( lag -- )
[ { 0 31 } nths sum 1000000 rem ] keep push-circular ;
[ { 0 31 } swap nths sum 1000000 rem ] keep push-circular ;
: next ( lag -- n )
[ first ] [ advance ] bi ;