Name:
:.
add an element at the end of a list.
Usage:
L
:.
x
: (
list
,
any type
) ->
list
Parameters:
L
is a list (possibly empty).
x
is an object of any type.
Description:
:.
adds the element
x
at the end of the list
L
.
Note that since
x
may be of any type, it can in particular be a list.
Example 1:
> [|2,3,4|]:.5;
[|2, 3, 4, 5|]
Example 2:
> [|1,2,3|]:.[|4,5,6|];
[|1, 2, 3, [|4, 5, 6|]|]
Example 3:
> [||]:.1;
[|1|]
See also:
.:
,
@
Go back to the list of commands