]> gitweb.factorcode.org Git - factor.git/commitdiff
removed trash / reformatted some lines
authorSascha Matzke <sascha.matzke@didolo.org>
Fri, 1 May 2009 14:23:06 +0000 (16:23 +0200)
committerSascha Matzke <sascha.matzke@didolo.org>
Fri, 1 May 2009 14:23:06 +0000 (16:23 +0200)
extra/bson/writer/writer.factor

index ae12ca0a0340ef323d8773cfb01d42080271ef4a..1b9d45b1241495c360fb72c93d603b6d9a79baf0 100644 (file)
@@ -6,11 +6,8 @@ io.encodings.utf8 io.streams.byte-array kernel math math.parser
 namespaces quotations sequences sequences.private serialize strings
 words combinators.short-circuit literals ;
 
-
 IN: bson.writer
 
-#! Writes the object out to a byte-vector in BSON format
-
 <PRIVATE
 
 SYMBOL: shared-buffer 
@@ -24,10 +21,9 @@ CONSTANT: INT64-SIZE 8
     [ 8192 <byte-vector> [ shared-buffer set ] keep ] unless* ; inline
 
 : >le-stream ( x n -- )
-    ! >le write  
-    swap '[ _ swap nth-byte 0 B{ 0 }
-            [ set-nth-unsafe ] keep write ] each
-            ; inline
+    swap
+    '[ _ swap nth-byte 0 B{ 0 }
+       [ set-nth-unsafe ] keep write ] each ; inline
 
 PRIVATE>