AnyFunctions1 S¶
any.spad line 125 [edit on github]
S: Type
AnyFunctions1 implements several utility functions for working with Any. These functions are used to go back and forth between objects of Any and objects of other types.
- retract: Any -> S
retract(a)
tries to converta
into an object of typeS
. If possible, it returns the object. Error: if no such retraction is possible.
- retractIfCan: Any -> Union(S, failed)
retractIfCan(a)
tries changea
into an object of typeS
. If it can, then such an object is returned. Otherwise, “failed” is returned.