Avoiding partial functions in Swift | Hacker News Reader