Should Elixir get a new "bad return" exception?

I don’t want to enforce that on users of my libraries, and not all return values are from behaviours callbacks.

For instance returning :not_a_list from the callback to Enum.flat_map breaks a contract.

1 Like