Optimizing code in Scala | Hacker News Reader