Matrices in Rascal:

You may define matrices in Rascal using enclosing bracket "[", "]" and 
semicolon ";", which is used to seperate lines. Thus a 2x2-matrix with the
values 1 and 2 in the first line, 3 and 4 in the second would be defined as:

   >A=[1 2;3 4];
   >A(2,1)
    3

You can access the content using the cell-operators. You can add, substract
matrices of appropriate dimensions, a division is done as a multiplication
with the inverse. You may compute the determinant using the det() function.

   >A=[1 2;3 5];B=[2 3;-2 5];
   >A+B
    [3 5;1 9]
   >1/A
    [-5 2;3 -1]
   >B/A
    [2 3;-2 5]
   >det(A)
    -1