verify/type
verify that a value has a type
Calling Sequence
Parameters
Description
Examples
verify(expr1, expr2, type)
expr1, expr2
-
anything
The verify(expr1, expr2, type) calling sequence returns true if expr2 is a type and expr1 is an expression of that type. That is, if type(expr1, expr2) returns true, then so does this calling sequence.
The verification type is not symmetric.
This calling sequence is useful in structured verifications. Outside of that situation, it is more efficient and clearer to call the type command directly.
If expr2 is not a type, then this command returns false. This is different from calling type(expr1, expr2) directly, which throws an error if expr2 is not a type.
verify⁡1,2,3,even,odd,as_set⁡type
true
verify⁡1,3,5,even,odd,as_set⁡type
false
verify⁡17,not_a_type,type
See Also
type
verify
verify/structured
Download Help Document