vector-append(3scm)
π vector-append β append vectors
okay so real talk, you're looking at the vector-append page from the Scheme Programmer's Manual, and honestly? it's a little bop. let's get into it bestie π«Ά
β¨ LIBRARY β¨
(import (scheme base)) ;R7RS
that's the import you need, no cap. it's R7RS flavored π
πΈ SYNOPSIS πΈ
(vector-append vector ...)
π¦ DESCRIPTION π¦
okay so picture this: you hand it a bunch of vectors, and it hands you back a brand new freshly allocated vector whose elements are just... all of the elements of the given vectors, smooshed together in a row. the concatenation. the whole lineup. it's giving friendship bracelet energy where everyone's beads end up on one string π
π RETURN VALUES π
it returns a single value, and that single value is a vector object. one (1) vector. that's it. slay β¨
π EXAMPLES π
(vector-append #(a b c) #(d e f))
=> #(a b c d e f)
look at that. ate and left no crumbs π
π COMPATIBILITY π
the vector-append over in SRFI-43 is identical to the one in R7RS. same function, different era. no drama, no differences, fr fr π€
π ERRORS π
[R7RS] it is an error if one of the arguments is not a vector. like, genuinely an error. not a vibe.
and here's where it gets spicy β implementations are allowed to do any of these:
- signal an error π
- extend the procedure's domain of definition to include such arguments π
- or fail catastrophically π
yeah. catastrophically. that's the actual word in the spec. so maybe don't pass it a non-vector unless you're feeling brave π
π§ SEE ALSO π§
append(3scm)β the cousin. the relative. go say hi π«Ά
β STANDARDS β
R7RS, SRFI-43
π°οΈ HISTORY π°οΈ
so the first RnRS report to actually carry this procedure is R7RS, and R7RS got it from SRFI-43. passing it down like a family recipe π
π AUTHORS π
this page is part of the scheme-manpages</scheme-manpages> project, and it includes materials from the RnRS documents. more info lives at https://github.com/schemedoc/manpages/ πΈ
and that's the whole page bestie, hope your vectors concatenate beautifully πβ¨
scheme-manpages project Β· dated 2022-03-29 Β· vector-append(3scm) Β· mwah π
π¦ where this page comes from
- nixpkgs unstable: scheme-manpages 0-unstable-2024-02-11
- π the page's license: MIT
- Copyright (c) 2022 SPDX-License-Identifier: MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms