Example of a functional programming refactoring pattern | Hacker News Reader