]> gitweb.factorcode.org Git - factor.git/commitdiff
spelling: use ?download-to.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 9 Jun 2014 15:58:05 +0000 (08:58 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 9 Jun 2014 15:58:05 +0000 (08:58 -0700)
extra/spelling/spelling.factor

index 0bf702da5aa798397e27a2e0a315fa5b7459b864..22b6024db9569cb77544c5dcb1cfdcb032cb610d 100644 (file)
@@ -59,9 +59,8 @@ CONSTANT: ALPHABET "abcdefghijklmnopqrstuvwxyz"
     ascii file-contents words histogram ;
 
 MEMO: default-dictionary ( -- counts )
-    "big.txt" temp-file dup exists?
-    [ URL" http://norvig.com/big.txt" over download-to ] unless
-    load-dictionary ;
+    URL" http://norvig.com/big.txt" "big.txt" temp-file
+    [ ?download-to ] [ load-dictionary ] bi ;
 
 : (correct) ( word dictionary -- word/f )
     corrections ?first ;