math.combinatorics: fix selections bug, geez.

factor-shell
John Benediktsson 2018-01-17 13:59:22 -08:00
parent 9d35cd9048
commit 1beaa8f494
1 changed files with 2 additions and 2 deletions

View File

@ -253,9 +253,9 @@ PRIVATE>
:: next-selection ( seq n -- )
1 seq length 1 - [
over 0 =
dup 0 >= [ over 0 = ] [ t ] if
] [
[ seq [ + n /mod ] change-nth-unsafe ] keep 1 -
[ seq [ + n /mod ] change-nth ] keep 1 -
] do until 2drop ; inline
:: (selections) ( seq n -- selections )