type/sequential - Maple Programming 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.
 • 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.
 • An expression sequence is also of type sequential. Please note that type((1,2),sequential) will return an error, since it simplifies to type(1,2,sequential) and checks that 1 is of type 2. However, evalb((1,2)::sequential) returns true.

Supertypes

 •

Subtypes

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