|
CS 3304: Comparative Languages
|
Primitive Functions (cont.)
5. CONS takes two parameters; returns a new list that includes the first parameter as its first element and the second parameter as the remainder
(cons 'a '(b c)) returns (a b c)
6. LIST takes any number of parameters; returns a list with the parameters as elements
(list 'a '(b c)) returns (a (b c))