integer?

native

(integer? x)

(integer? x) — x 是精确整数(机器整数或 bigint)时为 true。

与 number? 不互换:浮点 1.0 不是整数;float? 只认浮点。分开是因为两者可互换会把 1.0 经 i64 往返而悄悄改变算术。