]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/regexp/regexp.factor
core: Add the shuffler words but without primitives.
[factor.git] / basis / regexp / regexp.factor
index ff383b272b6990ca7a15ed6b7177c5f274eb081e..19d2d8710b9f884fd927b5e2300002b09401364b 100644 (file)
@@ -60,7 +60,7 @@ PRIVATE>
 :: next-match ( i string regexp quot: ( i string regexp -- j ) reverse? -- start end ? )
     f f f
     i string reverse? search-range
-    [ [ 3drop ] dip string regexp quot reverse? (next-match) dup ] find 2drop ; inline
+    [ 3nip string regexp quot reverse? (next-match) dup ] find 2drop ; inline
 
 : do-next-match ( i string regexp -- start end ? )
     dup next-match>>
@@ -130,7 +130,7 @@ PRIVATE>
     ] [ 2drop f ] if ;
 
 : re-contains? ( string regexp -- ? )
-    prepare-match-iterator do-next-match [ 2drop ] dip >boolean ;
+    prepare-match-iterator do-next-match 2nip >boolean ;
 
 : re-split ( string regexp -- seq )
     [ <slice-unsafe> ] (re-split) ;