Tips for golfing in Erlang Does anybody have tips for golfing in Erlang? I'm looking for specific things that can be applied to Erlang, not any language. I know we already have tips for Elixir, but that is different. 

As usual, please post separate tips in separate answers.
Use the ending conditions

Suppose you have a function reversing a list:

r([H|T])-&gt;[T]++r(H);r([])-&gt;[].


Since this is the only condition left, this can be golfed into:

r([H|T])-&gt;r(T)++[H];r(_)-&gt;[].


Or, since this is an identity function:

r([H|T])-&gt;r(T)++[H];r(I)-&gt;I.


You can also abuse the wild-cards in if statements. E.g.

if A&lt;B-&gt;A;true-&gt;B end.


This can be golfed into:

if A&lt;B-&gt;A;_-&gt;B end.