The list is the only structured data type in EDEN. Data items of different
types can be grouped to form a list using the
list formation operator
[]. Commas are used to separate the data. The whole list
is considered as a single data item. For example, the list
[ 100, 'a', "string", [1,2,3] ]
holds four items: an
integer (100), a
character ('a'), a
string ("string")
and a list ([1,2,3]).
There are no list constants in the language. The characteristics of the list data type are:
L = [ 100, 'a', "string", [1,2,3] ];
L holds four items: an
integer (100), a
character ('a'), a
string ("string")
and a list ([1,2,3]).
[]) after the list.
The first item is numbered 1 (not zero). For example,
L[1] | is the first item of L, i.e. 100
(in the previous example). |
L[4][2] | is 2 |
L[5] is an error since L has only four
items.L# is 4, and L[4]#
is 3. For the empty list, []# is 0.// returns the concatenated list of two lists; for
example,
[1,2,3] // [5,6,7]produces
[1,2,3,5,6,7]
append,
insert,
delete and
shift
statements.