Name:

@ concatenates two lists or strings or applies a list as arguments to a procedure

Usage:

L1@L2 : (list, list) -> list string1@string2 : (string, string) -> string proc@L1 : (procedure, list) -> any type

Parameters:

Description:

Example 1:

   > [|1,...,3|]@[|7,8,9|];
   [|1, 2, 3, 7, 8, 9|]

Example 2:

   > "Hello "@"World!";
   Hello World!

Example 3:

   > procedure cool(a,b,c) {
   > write(a,", ", b," and ",c," are cool guys.\n");
   > };
   > cool @ [| "Christoph", "Mioara", "Sylvain" |];
   Christoph, Mioara and Sylvain are cool guys.

Example 4:

   > procedure sayhello() {
   > "Hello! how are you?";
   > };
   > sayhello();
   Hello! how are you?
   > sayhello @ [||];
   Hello! how are you?

Example 5:

   > procedure add(L = ...) {
   > var acc, i;
   > acc = 0;
   > for i in L do acc = i + acc;
   > return acc;
   > };
   > add(1,2);
   3
   > add(1,2,3);
   6
   > add @ [|1, 2|];
   3
   > add @ [|1, 2, 3|];
   6
   > add @ [||];
   0
See also: .:, :., procedure, proc
Go back to the list of commands