]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/benchmark/recursive/recursive.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / extra / benchmark / recursive / recursive.factor
index 128ec571f2293d7969554199a0de008947b15cd7..219c73ae0aa62a32ead0bf410b281e45cffe2be0 100755 (executable)
@@ -7,18 +7,18 @@ IN: benchmark.recursive
 
 : ack ( m n -- x )
     {
-        { [ over zero? ] [ nip 1+ ] }
-        { [ dup zero? ] [ drop 1- 1 ack ] }
-        [ [ drop 1- ] [ 1- ack ] 2bi ack ]
+        { [ over zero? ] [ nip 1 + ] }
+        { [ dup zero? ] [ drop 1 - 1 ack ] }
+        [ [ drop 1 - ] [ 1 - ack ] 2bi ack ]
     } cond ; inline recursive
 
 : tak ( x y z -- t )
     2over <= [
         2nip
     ] [
-        [  rot 1- -rot tak ]
-        [ -rot 1- -rot tak ]
-        [      1- -rot tak ]
+        [  rot 1 - -rot tak ]
+        [ -rot 1 - -rot tak ]
+        [      1 - -rot tak ]
         3tri
         tak
     ] if ; inline recursive
@@ -26,7 +26,7 @@ IN: benchmark.recursive
 : recursive ( n -- )
     [ 3 swap ack . flush ]
     [ 27.0 + fib . flush ]
-    [ 1- [ 3 * ] [ 2 * ] [ ] tri tak . flush ] tri
+    [ 1 - [ 3 * ] [ 2 * ] [ ] tri tak . flush ] tri
     3 fib . flush
     3.0 2.0 1.0 tak . flush ;