4. List and String Manipulation Routines

Function Name Description
head The first element in the list
tail The list containing the second to the other elements
length The length of the list.
reverse A list whose elements are reversed.
take num_elems list Extracts a list with the first num_elems from list.
drop num_elems list Extracts the list starting with the num_elems+1's element.
filter callback list Extracts the list of elements that match a certain callback. A kin to grep in Perl.
map callback list transforms each element in the list according to the callback
a ++ b Concatenates the lists a and b

Written by Shlomi Fish