BadArityError exception (Elixir v1.19.0-dev)

View Source

An exception raised when a function is called with the wrong number of arguments.

For example:

iex> my_function = fn x, y -> x + y end
iex> my_function.(42)
** (BadArityError) #Function<41.39164016/2 in :erl_eval.expr/6> with arity 2 called with 1 argument (42)