ecl-logo Documentation

MatrixP

MatrixP[]pattern

returns a pattern that matches any matrix, which is an Nx2 array.

MatrixP[elementPattern]pattern

returns a pattern that matches matrix whose elements all match elementPattern.

Details

    Input
    Output

Examples

Basic Examples  (4)

Pattern that matches a matrix:

Pattern does not match something that is not an Nx2 matrix:

Matrix elements must match specified pattern:

Will not match if matrix elements do not match specified pattern: