Specification pattern implemented in swift (iOS/OSX)