IntegerRetractions S

retract.spad line 33 [edit on github]

Provides integer testing and retraction functions. Date Created: March 1990

integer?: S -> Boolean

integer?(x) is true if x is an integer, false otherwise.

integer: S -> Integer

integer(x) returns x as an integer; error if x is not an integer.

integerIfCan: S -> Union(Integer, failed)

integerIfCan(x) returns x as an integer, “failed” if x is not an integer.