math.combinatorics: faster combinations by inlining next-combination.
parent
f4ade1c5f2
commit
e9c6bf6b9a
|
@ -213,9 +213,7 @@ INSTANCE: combinations immutable-sequence
|
||||||
1 [-] seq increment-rest
|
1 [-] seq increment-rest
|
||||||
] [
|
] [
|
||||||
seq increment-last
|
seq increment-last
|
||||||
] if* seq ;
|
] if* seq ; inline
|
||||||
|
|
||||||
HINTS: next-combination array fixnum ;
|
|
||||||
|
|
||||||
:: combinations-quot ( seq k quot -- seq quot' )
|
:: combinations-quot ( seq k quot -- seq quot' )
|
||||||
seq length :> n
|
seq length :> n
|
||||||
|
|
Loading…
Reference in New Issue