bytevector?(3scm) Scheme Programmer's Manual bytevector?(3scm)

bytevector? - test if an object is a bytevector

(import (rnrs))                     ;R6RS
(import (rnrs bytevectors))         ;R6RS
(import (scheme base))              ;R7RS

(bytevector? obj)

Returns #t if obj is a bytevector, otherwise returns #f.

Returns a single boolean object as per the description.

(bytevector? #vu8(1 2 3))  => #t   ; R6RS
(bytevector? #u8(1 2 3))   => #t   ; R7RS
(bytevector? "123")        => #f
(bytevector? '#(1 2 3))    => #f

Bytevectors are a disjoint type in both R6RS and R7RS. This is specified in R6RS standard libraries § 2 and in R7RS § 3.2.

This procedure can raise exceptions with the following condition types:
&assertion (R6RS)
The wrong number of arguments was passed.
R7RS
The assertions described above are errors. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.

make-bytevector(3scm)

R6RS, R7RS

R6RS is the first Scheme report to have bytevectors.

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.

2021-01-17