{"action":"closed","issue":{"url":"https://api.github.com/repos/Jintin/Swimat/issues/86","repository_url":"https://api.github.com/repos/Jintin/Swimat","labels_url":"https://api.github.com/repos/Jintin/Swimat/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/Jintin/Swimat/issues/86/comments","events_url":"https://api.github.com/repos/Jintin/Swimat/issues/86/events","html_url":"https://github.com/Jintin/Swimat/issues/86","id":145840581,"number":86,"title":"Correct Format for new Operator","user":{"login":"RafaelPlantard","id":5968478,"avatar_url":"https://avatars.githubusercontent.com/u/5968478?v=3","gravatar_id":"","url":"https://api.github.com/users/RafaelPlantard","html_url":"https://github.com/RafaelPlantard","followers_url":"https://api.github.com/users/RafaelPlantard/followers","following_url":"https://api.github.com/users/RafaelPlantard/following{/other_user}","gists_url":"https://api.github.com/users/RafaelPlantard/gists{/gist_id}","starred_url":"https://api.github.com/users/RafaelPlantard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RafaelPlantard/subscriptions","organizations_url":"https://api.github.com/users/RafaelPlantard/orgs","repos_url":"https://api.github.com/users/RafaelPlantard/repos","events_url":"https://api.github.com/users/RafaelPlantard/events{/privacy}","received_events_url":"https://api.github.com/users/RafaelPlantard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jintin/Swimat/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-05T00:10:18Z","updated_at":"2016-04-05T09:53:50Z","closed_at":"2016-04-05T09:53:50Z","body":"Expected:\r\n\r\n``` swift\r\ninfix operator <*> { associativity right precedence 150 }\r\n\r\nfunc <*> <T: Deserializable>(json: [AnyObject]?, type: T.Type) -> (object: [T]?, error: ErrorTypeApp?) {\r\n    guard let array = json as? [JSONDictionary] else {\r\n        return (nil, .ParserError)\r\n    }\r\n    return (array.map { T(data: $0) }, nil)\r\n}\r\n\r\nfunc <*> <T: Deserializable>(json: AnyObject?, type: T.Type) -> (object: T?, error: ErrorTypeApp?) {\r\n    guard let json = json as? JSONDictionary else {\r\n        return (nil, .ParserError)\r\n    }\r\n    return (T(data: json), nil)\r\n}\r\n\r\nfunc <*> <T: Deserializable>(json: JSONDictionary?, type: T.Type) -> (object: T?, error: ErrorTypeApp?) {\r\n    guard let json = json else {\r\n        return (nil, .ParserError)\r\n    }\r\n    return (T(data: json), nil)\r\n}\r\n\r\n```\r\n\r\nToday when formatted: \r\n\r\n``` swift\r\ninfix operator < * > { associativity right precedence 150 }\r\n\r\nfunc < * > <T: Deserializable>(json: [AnyObject]?, type: T.Type) -> (object: [T]?, error: ErrorTypeApp?) {\r\n\tguard let array = json as? [JSONDictionary] else {\r\n\t\treturn (nil, .ParserError)\r\n\t}\r\n\treturn (array.map { T(data: $0) }, nil)\r\n}\r\n\r\nfunc < * > <T: Deserializable>(json: AnyObject?, type: T.Type) -> (object: T?, error: ErrorTypeApp?) {\r\n\tguard let json = json as? JSONDictionary else {\r\n\t\treturn (nil, .ParserError)\r\n\t}\r\n\treturn (T(data: json), nil)\r\n}\r\n\r\nfunc < * > <T: Deserializable>(json: JSONDictionary?, type: T.Type) -> (object: T?, error: ErrorTypeApp?) {\r\n\tguard let json = json else {\r\n\t\treturn (nil, .ParserError)\r\n\t}\r\n\treturn (T(data: json), nil)\r\n}\r\n\r\n```"}}