Style Question

I honestly prefer the way I described mainly because the code is written with a “block shape”. I find it way easier on the eyes and provided better readability. When skimming over code catching these code blocks from “the corner of your eye” seems to make it easier to remember and associate what the code block does as well. Just my opinion, of course.

Yesterday I actually found that the following piece of code works:

var
|> case do
      :ok    -> 200
      :error -> 404
   end

but I couldn’t find an actual style I enjoyed for it. In these cases I prefer to not use syntactic sugar and shortcuts in order to keep the code in more standard and popular ways of styling.