]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/usa-cities/usa-cities.factor
factor: trim using lists
[factor.git] / extra / usa-cities / usa-cities.factor
index d1020037d92041edaefe340cf9fb1f6702fa2599..e688921e2c8570f51f54192942dff3d474d18263 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io.encodings.ascii sequences generalizations
-math.parser combinators kernel memoize csv summary
-words accessors math.order binary-search combinators.smart ;
+USING: accessors binary-search combinators combinators.smart csv
+io.encodings.ascii kernel math.order math.parser sequences
+summary ;
 IN: usa-cities
 
 SINGLETONS: AK AL AR AS AZ CA CO CT DC DE FL GA HI IA ID IL IN
@@ -22,7 +22,7 @@ M: no-such-state summary drop "No such state" ;
 
 MEMO: string>state ( string -- state )
     dup states [ name>> = ] with find nip
-    [ ] [ throw-no-such-state ] ?if ;
+    [ ] [ no-such-state ] ?if ;
 
 TUPLE: city
 first-zip name state latitude longitude gmt-offset dst-offset ;