Why aren’t type-check functions like is_atom
or is_integer
followed by a question mark, (is_atom?
or is_integer?
) since they return either true
or false
(like Enum.member?
)?
Is there any specific reason as to why?
Why aren’t type-check functions like is_atom
or is_integer
followed by a question mark, (is_atom?
or is_integer?
) since they return either true
or false
(like Enum.member?
)?
Is there any specific reason as to why?
The convention is that is_
prefixed functions can be used in guards, while ?
suffixed can’t.