]> gitweb.factorcode.org Git - factor.git/blobdiff - core/io/streams/byte-array/byte-array.factor
Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
[factor.git] / core / io / streams / byte-array / byte-array.factor
index 28d789d66f1ee514e070746c74d422c9307e412c..9d89c3d814d8e6e3ba43c17f279da60fffad3f76 100644 (file)
@@ -6,11 +6,11 @@ IN: io.streams.byte-array
     512 <byte-vector> swap <encoder> ;
 
 : with-byte-writer ( encoding quot -- byte-array )
-    >r <byte-writer> r> [ output-stream get ] compose with-output-stream*
+    [ <byte-writer> ] dip [ output-stream get ] compose with-output-stream*
     dup encoder? [ stream>> ] when >byte-array ; inline
 
 : <byte-reader> ( byte-array encoding -- stream )
-    >r >byte-vector dup reverse-here r> <decoder> ;
+    [ >byte-vector dup reverse-here ] dip <decoder> ;
 
 : with-byte-reader ( byte-array encoding quot -- )
-    >r <byte-reader> r> with-input-stream* ; inline
+    [ <byte-reader> ] dip with-input-stream* ; inline