Erlang collation behaviour implementation