You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add guard BIF `erlang:is_integer/3`, following the design of the
original EEP-16, only changing the name from `is_between` to
`is_integer`. This BIF takes in 3 parameters, `Term`, `LowerBound`,
and `UpperBound`.
It returns `true` if `Term`, `LowerBound`, and `UpperBound` are
all integers, and `LowerBound =< Term =< UpperBound`; otherwise,
it returns false.
Failure: `badarg` if `LowerBound` or `UpperBound` does not evaluate to
an integer.
Example:
````
1> is_integer(2, 1, 10).
true
2> is_integer(11, 1, 10).
false
3> is_integer(1, 1.0, 10.0).
** exception error: bad argument
in function is_integer/3
called as is_integer(1,1.0,10.0)
````
Co-authored-by: Björn Gustavsson <[email protected]>
Co-authored-by: John Högberg <[email protected]>
0 commit comments