]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unrolled-lists/unrolled-lists.factor
use ``if*`` instead of ``dup [ ] [ drop ] if``.
[factor.git] / basis / unrolled-lists / unrolled-lists.factor
index 1a72b0f1ff686cf3e153de7d42c69eaf751f72e9..bfb8e07e4f3b525bd7473dd054716a0492a66d65 100644 (file)
@@ -47,7 +47,7 @@ M: unrolled-list clear-deque
         unroll-factor 0 <array>
         [ unroll-factor 1 - swap set-nth ] keep f
     ] dip [ node boa dup ] keep
-    dup [ prev<< ] [ 2drop ] if ; inline
+    [ prev<< ] [ drop ] if* ; inline
 
 : normalize-back ( list -- )
     dup back>> [
@@ -93,7 +93,7 @@ M: unrolled-list pop-front*
     [
         unroll-factor 0 <array> [ set-first ] keep
     ] dip [ f node boa dup ] keep
-    dup [ next<< ] [ 2drop ] if ; inline
+    [ next<< ] [ drop ] if* ; inline
 
 : normalize-front ( list -- )
     dup front>> [