]> gitweb.factorcode.org Git - factor.git/blobdiff - core/io/streams/string/string.factor
Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
[factor.git] / core / io / streams / string / string.factor
index 10d8f7d9476fa11b117058790a4a2aaaf19b25e1..57c0cb37e8a25780fa3c6b951ad90ed6ff47fe8b 100644 (file)
@@ -24,7 +24,7 @@ M: null-encoding decode-char drop stream-read1 ;
     ] unless ;
 
 : map-last ( seq quot -- seq )
-    >r dup length <reversed> [ zero? ] r> compose 2map ; inline
+    [ dup length <reversed> ] dip [ 0 = ] prepose 2map ; inline
 
 PRIVATE>
 
@@ -75,7 +75,7 @@ M: growable stream-read-partial
     >sbuf dup reverse-here null-encoding <decoder> ;
 
 : with-string-reader ( str quot -- )
-    >r <string-reader> r> with-input-stream ; inline
+    [ <string-reader> ] dip with-input-stream ; inline
 
 INSTANCE: growable plain-writer