Introduction to Functional Programming in Scheme - slide 15 : 49 |

List functions

There exists a number of important List functions in Scheme, and we often write other such functions ourselves

`(null? lst)`A predicate that returns whether lst is empty`(list? lst)`A predicate that returns whether lst is a proper list`(length lst)`Returns the number of elements in a proper list lst`(append lst1 lst2)`Concatenates the elements of two or more lists`(reverse lst)`Returns the elements in lst in reverse order`(list-ref lst k)`Accesses element number k of the list lst`(list-tail lst k)`Returns the k'th tail of the list lst*And many more*

Lists are passed *by reference* to the functions that manipulate them