type/sequential - Maple Help

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

type/sequential

check for a sequential object

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

Parameters

 expr - expression K - type

Description

 • The type(expr, sequential) calling sequence returns true if expr is any one of the following types of Maple objects.

 • The type(expr, sequential(K)) calling sequence returns true if expr is of type sequential and type(x, K) is true for each element x in expr.

Examples

 > $A≔\left[\left[1,2,3\right],\left[1,1,1\right],\left[5,7,9\right]\right]$
 ${A}{:=}\left[\left[{1}{,}{2}{,}{3}\right]{,}\left[{1}{,}{1}{,}{1}\right]{,}\left[{5}{,}{7}{,}{9}\right]\right]$ (1)
 > $\mathrm{type}\left(A,\mathrm{sequential}\right)$
 ${\mathrm{true}}$ (2)
 > $S≔\left\{-1,\frac{1}{2},1.0,"hello"\right\}$
 ${S}{:=}\left\{{-}{1}{,}\frac{{1}}{{2}}{,}{1.0}{,}{"hello"}\right\}$ (3)
 > $\mathrm{type}\left(S,\mathrm{sequential}\left(\mathrm{literal}\right)\right)$
 ${\mathrm{true}}$ (4)