Erlang porting of Functional Programming Principles Assigments.