Post

I'm aware of this pattern but never needed it, as I prefer functions that return :ok | {:error, reason} as opposed to a boolean. Booleans are simply not informative enough, I don't like them :)

0 reposts0 likes

My bad for showing a wrong example, it’s not really about a function returning a bool instead of tuples, it’s the idea that every chained member in a with condition will by tagged with an atom describing the operation, so that we avoid collisions in the « else » block!