erlang snippets