]> gitweb.factorcode.org Git - factor.git/commitdiff
english: use ?pluralize in count-of-things.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 15 Feb 2018 23:15:58 +0000 (15:15 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 15 Feb 2018 23:15:58 +0000 (15:15 -0800)
basis/english/english.factor

index ae2de23d6991deb88ab8b4cafbb6ee540d783833..d5c696e8d71170396fec46dede4cb8457f3de6f7 100644 (file)
@@ -149,12 +149,12 @@ PRIVATE>
 : plural? ( word -- ? )
     [ singularize pluralize ] [ = ] bi ;
 
-: count-of-things ( count word -- str )
-    over 1 = [ pluralize ] unless [ number>string ] dip " " glue ;
-
 : ?pluralize ( count singular -- singular/plural )
     swap 1 = [ pluralize ] unless ;
 
+: count-of-things ( count word -- str )
+    dupd ?pluralize [ number>string ] dip " " glue ;
+
 : a10n ( word -- numeronym )
     dup length 3 > [
         [ 1 head ] [ length 2 - number>string ] [ 1 tail* ] tri