Go to the first, previous, next, last section, table of contents.


car, cdr, cons, append, reverse, length

car(list)
:: The first element of the given non-null list list.
cdr(list)
:: A list obtained by removing the first element of the given non-null list list.
cons(obj,list)
:: A list obtained by adding an element obj to the top of the given list list.
append(list1,list2)
:: A list obtained by adding all elements in the list list2 according to the order as it is to the last element in the list list1.
reverse(list)
:: reversed list of list.
length(list)
:: Number of elements in a list list.
return
car() : arbitrary, cdr(), cons(), append(), reverse() : list, length() : non-negative integer
list,list1,list2
list
obj
arbitrary
[0] L = [[1,2,3],4,[5,6]];
[[1,2,3],4,[5,6]]
[1] car(L);
[1,2,3]
[2] cdr(L);
[4,[5,6]]
[3] cons(x*y,L);
[y*x,[1,2,3],4,[5,6]]
[4] append([a,b,c],[d]);
[a,b,c,d]
[5] reverse([a,b,c,d]);
[d,c,b,a]
[6] length(L);
3
[7] L[2][0];
5


Go to the first, previous, next, last section, table of contents.