]> gitweb.factorcode.org Git - factor.git/commitdiff
project-euler.265: fix bad refactor.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 12 Jul 2016 16:07:10 +0000 (09:07 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 12 Jul 2016 16:07:10 +0000 (09:07 -0700)
extra/project-euler/265/265.factor

index 387677fef6eff647ec2043d8f9bcd0e57b190d64..261a9e8ff20b5167c33039d9990da895a8c706a9 100644 (file)
@@ -41,7 +41,7 @@ CONSTANT: N 5
 
 : ?register ( acc seq -- )
     complete rotate-bits
-    [ 2 N ^ mod ] map all-unique? [ infimum swap push ] [ drop ] if* ;
+    dup [ 2 N ^ mod ] map all-unique? [ infimum swap push ] [ 2drop ] if ;
 
 : add-bit ( seen bit -- seen' t/f )
     over last 2 * + 2 N ^ mod