Is this code idiomatic Elixir/functional?

As a final tweak, you can have the second clause just be def delete_db(values) because the only way it gets there is if it isn’t an empty list. You could add when is_list(values) if you really wanted to as well