vector?(3scm)

πŸ“¦ version 0-unstable-2024-02, in nixpkgs unstable

✨ vector? β€” the vibe check for vectors ✨

Ok so bestie, welcome to vector?(3scm), the Scheme Programmer's Manual page that's literally just here to answer one question: is this thing a vector or not? πŸ’…


πŸŽ€ LIBRARY

Import it from whichever flavour of Scheme you're living your life in:

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

🌸 SYNOPSIS

(vector? obj)

That's it. One argument. One question. One truth. πŸ¦‹


πŸ’– DESCRIPTION

So vector? takes obj and returns #t if obj is a vector, and #f otherwise. That's the whole personality. No cap, she's a one-trick icon and she ate. πŸ‘‘


⭐ RETURN VALUES

Returns a single boolean object, exactly as described above. One value, no drama. ✨


🌈 EXAMPLES

(vector? '#(1 2 3))    => #t
(vector? '(1 2 3))     => #f
(vector? "123")        => #f

The way that '#(1 2 3) is a vector and '(1 2 3) is a list and "123" is a string… literally three different besties, three different vibes. πŸ™ˆ


πŸ’€ ERRORS

This procedure can raise exceptions with the following condition types:

  • &assertion (R6RS) β€” the wrong number of arguments was passed. Not me passing the wrong count 😭
  • 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. Yes, catastrophically. Fr fr, don't test her. πŸ”₯

🫢 SEE ALSO

  • make-vector(3scm) β€” go make one first, then come back and ask if it's a vector. Main character energy. 🧚

πŸ‘‘ STANDARDS

R4RS, IEEE Scheme, R5RS, R6RS, R7RS. She's certified everywhere, iykyk. πŸŽ€


πŸ’œ AUTHORS

This page is part of the scheme-manpages project. It includes materials from the RnRs documents. More info lives at https://github.com/schemedoc/manpages/. πŸ“


And that's the whole page, bestie β€” dated 2021-01-17, from the Scheme Programmer's Manual, vector?(3scm). Stay iconic, stay boolean. πŸ’…βœ¨

πŸ“¦ where this page comes from