Name:
.:
add an element at the beginning of a list.
Usage:
x
.:
L
: (
any type
,
list
) ->
list
Parameters:
x
is an object of any type.
L
is a list (possibly empty).
Description:
.:
adds the element
x
at the beginning of the list
L
.
Note that since
x
may be of any type, it can be in particular a list.
Example 1:
> 1.:[|2,3,4|];
[|1, 2, 3, 4|]
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