nonemptylist - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


type/nonemptylist

check for a nonempty list

 

Calling Sequence

Parameters

Description

Subtypes

Supertypes

Examples

Calling Sequence

type(expr, nonemptylist)

type(expr, nonemptylist(K))

Parameters

expr

-

any expression

K

-

type name

Description

• 

In the first calling sequence, the type command checks if expr is a valid nonempty Maple list. It returns true if expr is a list containing at least one element and false otherwise.

• 

See the list help page for a description of the list datatype.

• 

In the second calling sequence, where K is a specified type name, the type command checks whether expr is a nonempty list whose entries are of type K.  That is, type(expr, nonemptylist(K)) returns true if type(expr, nonemptylist) is true and type(x, K) is true for each entry x of expr.

• 

See the type help page for a description of valid types in Maple.

Subtypes

• 

type/listlist

Supertypes

• 

type/list

Examples

Lx41,x2,x+3

Lx41,x2,x+3

(1)

typeL,nonemptylist

true

(2)

typeL,nonemptylistpolynominteger,x

true

(3)

type,nonemptylist

false

(4)

See Also

list

type

type/list

type/nonemptyset

type/set