]> gitweb.factorcode.org Git - factor.git/commitdiff
benchmark.backtrack: some cleanup.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 2 Jun 2015 02:46:40 +0000 (19:46 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 2 Jun 2015 02:46:40 +0000 (19:46 -0700)
extra/benchmark/backtrack/backtrack.factor

index befeaa856e86579d89c0dcb89ba2d9b3633351d1..6ab232606160f4e1c02257c93f79c58e91977241 100644 (file)
@@ -32,10 +32,10 @@ MEMO: 24-from-4 ( a b c d -- ? )
     [ some-rots do-something 24-from-3 ] [ 4drop ] if-amb ;
 
 : find-impossible-24 ( -- n )
-    1 10 [a,b] [| a |
-        1 10 [a,b] [| b |
-            1 10 [a,b] [| c |
-                1 10 [a,b] [| d |
+    10 [1,b] [| a |
+        10 [1,b] [| b |
+            10 [1,b] [| c |
+                10 [1,b] [| d |
                     a b c d 24-from-4
                 ] count
             ] map-sum