Simple Integer.is_even(10) raises error

I’m just getting an error like below. Running Erlang 24.2 and Elixir 1.13.1

iex(9)> Integer.is_even(10)
** (UndefinedFunctionError) function Integer.is_even/1 is undefined or private. However there is a macro with the same name and arity. Be sure to require Integer if you intend to invoke this macro
(elixir 1.13.1) Integer.is_even(10)

Is this known issue?


Did you include require Integer in the file (or type it into iex)?

explanation here: alias, require, and import - The Elixir programming language


Good catch. ‘require Integer’ did a trick

1 Like