]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/help/cookbook/cookbook.factor
Merge branch 'specialized-arrays'
[factor.git] / basis / help / cookbook / cookbook.factor
index fcde1ccedfd694dc38153bde3cb16f8170c8544d..e72fbb439c125baeb80edb1d09303c890c097bed 100644 (file)
@@ -205,10 +205,10 @@ ARTICLE: "cookbook-io" "Input and output cookbook"
 }
 "Convert a file of 4-byte cells from little to big endian or vice versa, by directly mapping it into memory and operating on it with sequence words:"
 { $code
-    "USING: accessors grouping io.files io.mmap kernel sequences ;"
-    "\"mydata.dat\" dup file-info size>> ["
+    "USING: accessors grouping io.files io.mmap.char kernel sequences ;"
+    "\"mydata.dat\" ["
     "    4 <sliced-groups> [ reverse-here ] change-each"
-    "] with-mapped-file"
+    "] with-mapped-char-file"
 }
 "Send some bytes to a remote host:"
 { $code