Example of a functional programming refactoring pattern | Dark Hacker News