Erlang code with GTT