]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/rot13/rot13.factor
factor: trim using lists
[factor.git] / extra / rot13 / rot13.factor
index 6663381522aeb2fbcde56cd4f2b526184c1cd0f7..b364f4530d4f0d3f9aa405fb03b7d17cc7883577 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2006 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math sequences strings io combinators ascii ;
+USING: kernel math sequences io combinators ascii ;
 IN: rot13
 
-: rotate ( ch base -- ch ) tuck - 13 + 26 mod + ;
+: rotate ( ch base -- ch ) [ - 13 + 26 mod ] [ + ] bi ;
 
 : rot-letter ( ch -- ch )
     {