I\'ve got to the stage where I\'ve written quite a bit of Erlang code now, and I can see some style (bad or good) creeping into the way I\'ve been writing it. This particula
Learn you some Erlang for great good has a small section on when to choose case
and when to use a function
. Two things are mentioned:
They are represented in the same way in the VM so there is no difference in performance between the two solutions.
If you need to use guards against more than one arguments, using a function may read better.
All in all, it is mostly a question of style and taste.