]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/99-bottles/99-bottles.factor
factor: words -> split-words, lines -> split-lines, fix errors
[factor.git] / extra / 99-bottles / 99-bottles.factor
index a8243751aabeb2d2686d577f87a0c5105879d73d..9035ec5867f1537eb82a1c1d16f311b2a0c829a9 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2011 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators combinators.smart io kernel math math.parser
-math.ranges sequences ascii ;
+USING: ascii combinators combinators.smart io kernel math
+math.parser math.ranges sequences splitting ;
 IN: 99-bottles
 
 : bottles ( n -- number string )
@@ -15,7 +15,7 @@ IN: 99-bottles
             [ bottles "of beer.\nTake one down, pass it around," ]
             [ 1 - bottles [ >lower ] dip "of beer on the wall." ]
         } cleave
-    ] output>array unwords print nl ;
+    ] output>array join-words print nl ;
 
 : last-verse ( -- )
     "No more bottles of beer on the wall, no more bottles of beer." print