list(3scm) Scheme Programmer's Manual list(3scm)

list - create a list from the arguments

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

(list obj ...)

Returns a newly allocated list of its arguments.

Returns a single value; a list.

(list 'a (+ 3 4) 'c)  =>  (a 7 c)
(list)                =>  ()

Except for out of memory situations, this procedure works the same everywhere.

This procedure can raise exceptions with the following condition types:
&implementation-restriction (R6RS)
There is not enough free memory to hold the new pairs. (Not all implementations raise this exception, the majority just crash.)
R7RS
Implementations may signal an error during out of memory conditions, or fail catastrophically.

cons*(3scm), vector(3scm)

R4RS, IEEE Scheme, R5RS, R6RS, R7RS

The list function first appeared in LISP 1.5 (1962).

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/.

2023-03-26