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


car, cdr, cons, append, reverse, length

car(list)
:: 空でない list の先頭要素.
cdr(list)
:: 空でない list から先頭要素を取り除いたリスト.
cons(obj,list)
:: list の先頭に obj を付け加えたリスト.
append(list1,list2)
:: list1list2 をこの順に 1 つにしたリスト.
reverse(list)
:: list を逆順にしたリスト.
length(list|vect)
:: list の長さ, または vect の長さ.
return
car() : 任意, cdr(), cons(), append(), reverse() : リスト, length() : 自然数
list list1 list2
リスト
obj
任意
[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] length(ltov(L));
3
[8] L[2][0];
5


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