April 2017
Intermediate to advanced
316 pages
9h 33m
English
The <| operator is used to decode a value at the specified key path into the requested type. This operator uses a function named flatReduce that reduces and flattens the sequence:
public func <| <A: Decodable>(json: JSON, keys: [String]) -> Decoded<A> where A == A.DecodedType { return flatReduce(keys, initial: json, combine: decodedJSON) >>- A.decode }
Read now
Unlock full access