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