Functional refactoring in Scala | Hacker News Reader