Functional examples from the book Functional Javascript