Making error handling a breeze with “WITH” macro in Elixir 1.2

In all the cases where you have:

{:ok, result2} <- half(result2),

Did you mean to write:

{:ok, result2} <- half(result1),

Since result2 doesn’t yet exist?

Great article, though! I’m still learning Elixir and never heard of ‘with’!

Like what you read? Give Andrew Benz a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.