Welcome to the CHICKEN Scheme pasting service

u8bytes->number added by C-Keen on Sun Sep 4 16:19:04 2011

(define (bytes->number bytes signed?)
  (let* ((hi (u8vector-ref bytes 0))
         (lo (u8vector-ref bytes 1))
         (u  (fxior (fxshl hi 8) lo))
         (s (if (bit-set? u 15) -1 1)))
    (if signed?
      (fx* s (fxand (fxnot (fxshl 1 15)) u))
      u)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which version of Scheme does C4 implement?
Visually impaired? Let me spell it for you (wav file) download WAV