]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/rosetta-code/text-processing/max-licenses/max-licenses.factor
core: subseq-index? -> subseq-of?
[factor.git] / extra / rosetta-code / text-processing / max-licenses / max-licenses.factor
index 1fdac5293fd674eb1aecbc7e5f1697554acae018..9c931179570be5c8c4930ca6a319fa0e3af78bc1 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (c) 2012 Anonymous
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors http.client io io.encodings.ascii io.files
-io.files.temp kernel math math.parser memoize sequences
+io.files.temp kernel math math.parser sequences
 splitting urls ;
 IN: rosetta-code.text-processing.max-licenses
 
@@ -32,9 +32,9 @@ TUPLE: maxlicense max-count current-count times ;
 
 : <maxlicense> ( -- max ) -1 0 V{ } clone \ maxlicense boa ; inline
 
-: out? ( line -- ? ) [ "OUT" ] dip subseq? ; inline
+: out? ( line -- ? ) "OUT" subseq-of? ; inline
 
-: line-time ( line -- time ) words harvest fourth ; inline
+: line-time ( line -- time ) split-words harvest fourth ; inline
 
 : update-max-count ( max -- max' )
     dup [ current-count>> ] [ max-count>> ] bi >