This is mainly for consistency with other words
(factors, group-factors, unique-factors)
---
 basis/math/primes/factors/factors.factor |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/basis/math/primes/factors/factors.factor 
b/basis/math/primes/factors/factors.factor
index dd73b0a..105bd5b 100644
--- a/basis/math/primes/factors/factors.factor
+++ b/basis/math/primes/factors/factors.factor
@@ -47,8 +47,10 @@ PRIVATE>
     dup 1 = [
         1array
     ] [
-        group-factors [ first2 [0,b] [ ^ ] with map ] map
-        [ product ] product-map natural-sort
+        group-factors dup empty? [
+            [ first2 [0,b] [ ^ ] with map ] map
+            [ product ] product-map natural-sort
+        ] unless
     ] if ;
 
 : unix-factor ( string -- )
-- 
1.7.0.4


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to