Since Elixir 1.2, Elixir has had the with macro to assist with more expressive control flow. Instead of deeply nested case and if/else blocks, you can have one single with block to express the same logic but in a more elegant and readable way. I’ll explore how you can utilize with to improve your code. with Basics with works by taking a list of clauses to be matched in order. If all clauses match,
![Better Control Flow Using The "with" Macro - DockYard](https://cdn-ak-scissors.b.st-hatena.com/image/square/67dc1da8f7ba8e119b1797b12e82e3ace0817add/height=288;version=1;width=512/https%3A%2F%2Fi.imgur.com%2FZy98OLm.jpg)