Name:

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

Library name:

sollya_obj_t sollya_lib_concat(sollya_obj_t, sollya_obj_t)

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:

   > bashexecute("gcc -fPIC -Wall -c externalprocexample.c");
   > bashexecute("gcc -fPIC -shared -o externalprocexample externalprocexample.o");
   > externalproc(foo, "./externalprocexample", (integer, integer) -> integer);
   > foo;
   foo
   > foo @ [|5, 6|];
   11

Example 6:

   > 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, externalproc, proc, bind, getbacktrace
Go back to the list of commands