[top][index]
search for:

isTable -- whether something is a rectangular list of lists

Warning: it is intrinsically impossible to represent a 0 by k matrix as a list of lists.

i1 : isTable {{1,2,3},{4,5}}

o1 = false
i2 : isTable {{1,2,3},{4,5,6}}

o2 = true

Code:

     -- ../../../Macaulay2/m2/tables.m2:9-12
     isTable = m -> (
          class m === List and
          #m > 0 and
          all(m, row -> class row === List and #row === #m#0))

[top][index]
search for: