append -- r7rs Definition procedure;
Procedure variants:
(() -> (null))
null;(((a any)) -> ((a any)))
((list-proper |2...|) -> (list-proper))
list-proper;... -- at least 2 times;list-proper;((&variadic-min +1 list-proper &trailing any) -> (list-dotted))
list-proper;any;list-dotted;scheme:base -- (scheme base);scheme -- (scheme);(append list ...)Domain: The last argument, if there is one, can be of any type.
Returns a list consisting of the elements of the first
listfollowed by the elements of the otherlists. If there are no arguments, the empty list is returned. If there is exactly one argument, it is returned. Otherwise the resulting list is always newly allocated, except that it shares structure with the last argument. An improper list results if the last argument is not a proper list.(append '(x) '(y)) ===> (x y) (append '(a) '(b c d)) ===> (a b c d) (append '(a (b)) '((c))) ===> (a (b) (c))(append '(a b) '(c . d)) ===> (a b c . d) (append '() 'a) ===> a
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.