Implementing http://learnyousomeerlang.com example