math.combinatorics: remove memoize of factorial.

If lots of large factorials are computed could use too much memory.
factor-shell
John Benediktsson 2018-01-16 14:57:17 -08:00
parent 1c41499681
commit 9a4441a80e
1 changed files with 3 additions and 3 deletions

View File

@ -3,8 +3,8 @@
USING: accessors arrays assocs binary-search classes.tuple
combinators fry hints kernel kernel.private locals math
math.order math.ranges memoize namespaces sequences
sequences.private sorting strings vectors ;
math.order math.ranges namespaces sequences sequences.private
sorting strings vectors ;
IN: math.combinatorics
<PRIVATE
@ -28,7 +28,7 @@ M: object nths-unsafe (nths-unsafe) ;
PRIVATE>
MEMO: factorial ( n -- n! )
: factorial ( n -- n! )
dup 1 > [ [1,b] product ] [ drop 1 ] if ;
: nPk ( n k -- nPk )