Skip to content

Instantly share code, notes, and snippets.

@AlexanderNey
Last active August 29, 2015 14:23
Show Gist options
  • Save AlexanderNey/a18dbc041dc292c6234a to your computer and use it in GitHub Desktop.
Save AlexanderNey/a18dbc041dc292c6234a to your computer and use it in GitHub Desktop.
ARTICLE Function Composing Swift 2.0 - 4
func unmarshalJSON<T : Unmarshallable>(type: T.Type)(json: JSON) throws -> T { ... }
let handleResponse = combine(combine(parseJSONFromNSData, validateJSONResponse), unmarshalJSON(Model.self))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment