]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/reports/noise/noise.factor
if-empty changes
[factor.git] / extra / reports / noise / noise.factor
index 4a361210463fe252b9d6bf25ed87b4096aa1baf3..78ede328013cd382dd1333ba2652d8c427c7107f 100755 (executable)
@@ -155,11 +155,11 @@ M: lambda-word word-noise-factor
 : vocab-noise-factor ( vocab -- factor )\r
     words flatten-generics\r
     [ word-noise-factor dup 20 < [ drop 0 ] when ] map\r
-    dup empty? [ drop 0 ] [\r
+    [ 0 ] [\r
         [ [ sum ] [ length 5 max ] bi /i ]\r
         [ supremum ]\r
         bi +\r
-    ] if ;\r
+    ] if-empty ;\r
 \r
 : noisy-vocabs ( -- alist )\r
     vocabs [ dup vocab-noise-factor ] { } map>assoc\r