Your simplification seems reasonable to me. Since you mentioned lines of code, you could easily just do the following, without (in my opinion) any loss of clarity:
# renaming raise_error_or_return_value_in_tuple/3 to bang/3
def do_something!(input, number) do
bang(do_something(input, number))
end
I have not used it but there is also the bang library.






















