For the past year or so I’ve been trying to learn a new language called Erlang.

I’ve found this nice document, which can be used when learning the language. So here I am on Saturday evening doing some Erlang exercises :-)

Anyhow, I was doing exercise 3.4:

  1. Erlang provides a function lists:append which joins two lists together, implement you own function append that performs the append operation. (Do NOT peek; the answer is given in figure 3.11).

And the answer given is: