Switched to use a switch :), seems much more elegant than the other if-else approach. Thanks to http://blog.tackmobile.com/article/functional-paradigms-in-swift/