 }
 
 @discardableResult
-public func <- <T: JSONable, U: Transform, C: MappingContext>(field: inout T?, map:(key: Binding<U>, context: C)) -> C where U.MappedObject == T, T == T.ConversionType {
-    return mapFieldWithMapping(&field, map: map)
+public func <- <T: JSONable, U: Transform, C: MappingContext>(field: inout T?, binding:(key: Binding<U>, context: C)) -> C where U.MappedObject == T, T == T.ConversionType {
+    return map(to: &field, using: binding)
 }
 
 // MARK: - Map funcs

}

@discardableResult
public func <- <T, U: Mapping, C: MappingContext>(field: inout T?, map:(key: Binding<U>, context: C)) -> C where U.MappedObject == T {
    return mapFieldWithMapping(&field, map: map)
}

// Transform.

    return binding.context
}

public func map<T, U: Mapping, C: MappingContext>(to field: inout T?, using binding:(key: Binding<U>, context: C)) -> C where U.MappedObject == T {
    
    guard binding.context.error == nil else {
        return binding.context
    }
    
    guard case .mapping(let key, let mapping) = binding.key else {
        let userInfo = [ NSLocalizedFailureReasonErrorKey : "Expected KeyExtension.mapping to map type \(T.self)" ]
        binding.context.error = NSError(domain: CrustMappingDomain, code: -1000, userInfo: userInfo)
        return binding.context
    }
    
    do {
        switch binding.context.dir {
        case .toJSON:
            let json = binding.context.json
            try binding.context.json = Crust.map(to: json, fromField: field, viaKey: key, mapping: mapping)
        case .fromJSON:
            if let baseJSON = binding.context.json[binding.key] {
                try mapFromJson(baseJSON, toField: &field, mapping: mapping, context: binding.context)
            }
            else {
                let userInfo = [ NSLocalizedFailureReasonErrorKey : "JSON at key path \(binding.key) does not exist to map from" ]
                throw NSError(domain: CrustMappingDomain, code: 0, userInfo: userInfo)
            }
        }
    }
    catch let error as NSError {
        binding.context.error = error
    }
    
    return binding.context
}

// MARK: - To JSON
