Initial revision
[LeanCalc.git] / help / append
1 NAME
2     append - append one or more values to end of list
3
4 SYNOPSIS
5     append(x, y_0, y_1, ...)
6
7 TYPES
8     x           lvalue whose value is a list
9     y_0, ...    any
10
11     return      null value
12
13 DESCRIPTION
14     If after evaluation of y_0, y_1, ..., x is a list with contents
15     (x_0, x_1, ...), then after append(x, y_0, y_1, ...), x has
16     contents (x_0, x_1, ..., y_0, y_1, ...).
17
18     If after evaluation of y_0, y_1, ..., x has size n,
19     append(x, y_0, y_1, ...) is equivalent to insert(x, n, y_0, y_1, ...).
20
21 EXAMPLE
22     > x = list(2,3,4)
23     > append(x, 5, 6)
24     > print x
25
26     list (5 elements, 5 nonzero):
27       [[0]] = 2
28       [[1]] = 3
29       [[2]] = 4
30       [[3]] = 5
31       [[4]] = 6
32
33     > append(x, pop(x), pop(x))
34     > print x
35
36     list (5 elements, 5 nonzero):
37       [[0]] = 4
38       [[1]] = 5
39       [[2]] = 6
40       [[3]] = 2
41       [[4]] = 3
42
43     > append(x, (remove(x), 7))
44     > print x
45
46     list (5 elements, 5 nonzero):
47       [[0]] = 4
48       [[1]] = 5
49       [[2]] = 6
50       [[3]] = 2
51       [[4]] = 7
52
53 LIMITS
54     append() can have at most 100 arguments
55
56 LINK LIBRARY
57     none
58
59 SEE ALSO
60      delete, insert, islist, list, pop, push, remove, rsearch, search, size
61