Shift Solution
[row..n, 1..n] temp := temp@east; -- rotate row i west by i-1 elements
[row..n, 1..n] temp2 := temp2@west; -- rotate row i east by i-1 elements
/* Process the forward diagonals */
[south of R] temp := *<<[R] temp; -- calculate column products
[south of R] ldsum := +<< temp; -- sum the products
/* Process the reverse diagonals */
[south of R] temp2 := *<<[R] temp2; -- calculate column products
[south of R] rdsum := +<< temp2; -- sum the products
return ldsum - rdsum; -- Return the determinant