]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/text-to-pdf/text-to-pdf.factor
factor: trim using lists
[factor.git] / extra / text-to-pdf / text-to-pdf.factor
index 7d54e0ea477d397ae2ca51de412b31b9706c2690..9d7cff28580aeedbdb5ab8c4f9632f033f5bbb14 100644 (file)
@@ -1,9 +1,8 @@
 ! Copyright (C) 2010 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
 
-USING: assocs calendar combinators environment formatting
-grouping io io.files kernel make math math.ranges sequences
-splitting xml.entities ;
+USING: assocs calendar environment formatting grouping io.files
+kernel make math ranges sequences splitting xml.entities ;
 
 IN: text-to-pdf
 
@@ -124,7 +123,7 @@ IN: text-to-pdf
         dup length 5 swap 2 range boa zip
         [ pdf-page , pdf-text , ] assoc-each
     ] { } make
-    dup length [1,b] zip [ first2 pdf-object ] map ;
+    dup length [1..b] zip [ first2 pdf-object ] map ;
 
 : objects>pdf ( objects -- str )
     [ join-lines "\n" append "%PDF-1.4\n" ]