I am quite new at haskell. Our task is to write an algorithm that calculates the dimension of a square matrix. But we are not supposed to use lists. But I dont know how to access to each element of the matrix, which is given like that:
matrixA 1 1 = 0
matrixA 1 2 = 42
matrixA 1 3 = 1337
matrixA 2 1 = 501
matrixA 2 2 = 314
matrixA 2 3 = 301
matrixA 3 1 = 13
matrixA 3 2 = 161
matrixA 3 3 = 271
matrixA _ _ = -1