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 = [
|
dup 1 = [
|
||||||
1array
|
1array
|
||||||
] [
|
] [
|
||||||
group-factors [ first2 [0,b] [ ^ ] with map ] map
|
group-factors dup empty? [
|
||||||
[ product ] product-map natural-sort
|
[ first2 [0,b] [ ^ ] with map ] map
|
||||||
|
[ product ] product-map natural-sort
|
||||||
|
] unless
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: unix-factor ( string -- )
|
: unix-factor ( string -- )
|
||||||
|
|
Loading…
Reference in New Issue