HasComplexType
Checks if an object is of a complex data type (even if its mathematical value happens to be real) or contains such objects.
Syntax
-
HasComplexType(X)
-
X
is any object
-
Description
If X
is any object, then HasComplexType(X)
returns true
iff the datatype of X
is complex, even if the mathematical value of X
happens to be real, or X
is an object container that contains such complex-typed objects.
Examples
L ≔ '(2, π, i, i^2, '(e), '(i^2)); Q ≔ X ↦ '(IsComplexType(X), HasComplexType(X));
L @ Q
(false, false) (false, false) (true, true) (true, true) (false, false) (false, true)