     [ dup length over ] 2dip call
     [ (head) <slice-unsafe> ] [ zero? not ] bi ; inline
 
-: fast>fixnum ( n -- n' )
-    dup fixnum? [ >fixnum ] unless ; inline
-
 PRIVATE>
 
 : stream-read ( n stream -- seq/f )

: lines ( -- seq )
    input-stream get stream-lines ; inline

: each-stream-block-slice ( ... stream quot: ( ... block-slice -- ... ) -- ... )
    [ drop ] prepose
    swap [ 65536 swap (new-sequence-for-stream) ] keep
    [ stream-read-partial-into ] 2curry each-morsel drop ; inline

: each-stream-block ( ... stream quot: ( ... block -- ... ) -- ... )
    swap [ 65536 swap stream-read-partial ] curry each-morsel ; inline

: each-block-slice ( ... quot: ( ... block -- ... ) -- ... )
    input-stream get swap each-stream-block-slice ; inline


ERROR: invalid-read-buffer buf stream ;

: stream-read-into ( buf stream -- buf-slice more? )
    [ stream-read-unsafe { fixnum } declare ] (read-into) ; inline

