divisors returns empty list for 0
This is mainly for consistency with other words (factors, group-factors, unique-factors)db4
parent
653d433798
commit
4fcdb2fbd5
|
@ -47,8 +47,10 @@ PRIVATE>
|
|||
dup 1 = [
|
||||
1array
|
||||
] [
|
||||
group-factors [ first2 [0,b] [ ^ ] with map ] map
|
||||
group-factors dup empty? [
|
||||
[ first2 [0,b] [ ^ ] with map ] map
|
||||
[ product ] product-map natural-sort
|
||||
] unless
|
||||
] if ;
|
||||
|
||||
: unix-factor ( string -- )
|
||||
|
|
Loading…
Reference in New Issue