Arrays: Difference between revisions

Content added Content deleted
(→‎Insitux: implementation)
Line 4,676: Line 4,676:
print(d[1])
print(d[1])
}</syntaxhighlight>
}</syntaxhighlight>

=={{header|Insitux}}==
<syntaxhighlight lang="insitux">> (var my-list [1 2 3 4 5]) ;syntactic sugar
[1 2 3 4 5]

> (var my-list (vec 1 2 3 4 5))
[1 2 3 4 5]

> my-list
[1 2 3 4 5]

> (3 my-list) ;fourth element
4

> (-1 my-list) ;last element
5

> (append my-list 100)
[1 2 3 4 5 100]

> my-list ;variables are immutable so my-list cannot be changed without being redefined
[1 2 3 4 5]</syntaxhighlight>


=={{header|Io}}==
=={{header|Io}}==