Algebra in Erlang