Welcome to the CHICKEN Scheme pasting service

Dynamic SRFI-4 vector construction added by sjamaan on Fri Sep 18 16:11:27 2015

(define (blob->number-vector type blob)
  (unless (memq type '(u8vector s8vector u16vector s16vector u32vector s32vector))
    (error "Unknown SRFI-4 vector type!"))
  ;; TODO: Check that the length is a multiple of the chosen type
  (##sys#make-structure type blob))

;; Usage:
;; (blob->number-vector 'u8vector #${1 2 3 4})
;; => #u8(1 2 3 4)

Your annotation:

Enter a new annotation:

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