The code of my blog article (in portuguese only): Introduction to functional programming in javascript