]> gitweb.factorcode.org Git - factor.git/commitdiff
lint: add suggestion to replace "-roll -roll" with 2swap
authorAlexander Iljin <ajsoft@yandex.ru>
Thu, 3 Jan 2019 22:46:13 +0000 (23:46 +0100)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 3 Jan 2019 23:36:34 +0000 (15:36 -0800)
extra/lint/lint.factor

index 9e47a5877fa7ed143ea619f357a7199ae622bc74..a94fe1c08a77e172689c7db5aca4d40cb6c5ab38 100644 (file)
@@ -3,8 +3,8 @@
 USING: accessors arrays assocs classes classes.tuple.private
 combinators.short-circuit continuations fry io kernel
 kernel.private locals.backend make math math.private namespaces
-prettyprint quotations sequences sequences.deep slots.private
-splitting stack-checker vocabs words words.alias ;
+prettyprint quotations sequences sequences.deep shuffle
+slots.private splitting stack-checker vocabs words words.alias ;
 IN: lint
 
 <PRIVATE
@@ -17,6 +17,7 @@ CONSTANT: manual-substitutions
         { rot [ swapd swap ] }
         { over [ dup swap ] }
         { swapd [ [ swap ] dip ] }
+        { 2swap [ -roll -roll ] }
         { 2nip [ nip nip ] }
         { 3nip [ 2nip nip ] }
         { 4nip [ 3nip nip ] }