]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/usa-cities/usa-cities.factor
factor: use ??if instead of ?if-old
[factor.git] / extra / usa-cities / usa-cities.factor
index 74167d68ced9ce812890d4dacdc4f668d748a174..63315169f04aab7e799b779646c75e6d4d89c0c6 100644 (file)
@@ -21,8 +21,8 @@ ERROR: no-such-state name ;
 M: no-such-state summary drop "No such state" ;
 
 MEMO: string>state ( string -- state )
-    dup states [ name>> = ] with find nip
-    [ ] [ no-such-state ] ?if ;
+    [ states [ name>> = ] with find nip ]
+    [ no-such-state ] ?unless ;
 
 TUPLE: city
 first-zip name state latitude longitude gmt-offset dst-offset ;