type/listlist - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/listlist

type/listlist

Check for a list of lists

 Calling Sequence type(expr, listlist) type(expr, listlist(K))

Parameters

 expr - any expression K - type name

Description

 • The function type/listlist returns true if expr is a nonempty list of lists, with each inner list having the same number of elements. Otherwise, it returns false.
 • If a type is given, then an additional check will be made to ensure that all the operands of the inner lists are of the given type.

Supertypes

 •

Examples

 > $\mathrm{type}\left(\left[\right],'\mathrm{listlist}'\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left(\left[\left[1,2\right],\left[3,4\right]\right],'\mathrm{listlist}'\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(\left[\left[1,2\right],\left[3,4\right]\right],'\mathrm{listlist}\left(\mathrm{integer}\right)'\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\left[8,7,6,12\right],'\mathrm{listlist}'\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(\left[\left[1,2\right],\left[3,4,5\right]\right],'\mathrm{listlist}'\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{type}\left(\left[\left[\right]\right],'\mathrm{listlist}'\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{type}\left(\left[\left[\left[a\right],\left[b\right]\right],\left[\left[c\right],\left[d\right]\right]\right],'\mathrm{listlist}'\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left(\left[\left[\left[a\right],\left[b\right]\right],\left[\left[c\right],\left[d\right]\right]\right],'\mathrm{listlist}\left(\mathrm{integer}\right)'\right)$
 ${\mathrm{false}}$ (8)