 // MARK: - RangeReplaceableCollectionType (Array and Realm List follow this protocol).
 
 @discardableResult
-public func <- <T, U: Mapping, C: MappingContext>(field: inout U.SequenceKind, map:(key: Binding<U>, context: C)) -> C where U.MappedObject == T, U.SequenceKind: RangeReplaceableCollection, U.SequenceKind.Iterator.Element == U.MappedObject, T: Equatable {
-    
-    return mapFromJson(toCollection: &field, map: map)
+public func <- <T, U: Mapping, C: MappingContext>(field: inout U.SequenceKind, binding:(key: Binding<U>, context: C)) -> C where U.MappedObject == T, U.SequenceKind: RangeReplaceableCollection, U.SequenceKind.Iterator.Element == U.MappedObject, T: Equatable {
+    
+    return map(toCollection: &field, using: binding)
 }
 
 private func map<T, U: Mapping, V: Sequence>(
     to json: JSONValue,
-    fromField field: V,
-    viaKey key: Keypath,
-    mapping: U)
+    from field: V,
+    via key: Keypath,
+    using mapping: U)
     throws -> JSONValue
     where U.MappedObject == T, V.Iterator.Element == T, U.SequenceKind.Iterator.Element == U.MappedObject {
         

}

@discardableResult
public func mapFromJson<T, U: Mapping, C: MappingContext>(toCollection field: inout U.SequenceKind, map:(key: Binding<U>, context: C)) -> C where U.MappedObject == T, U.SequenceKind: RangeReplaceableCollection, U.SequenceKind.Iterator.Element == U.MappedObject, T: Equatable {
    
    do {
        switch map.context.dir {
        case .toJSON:
            let json = map.context.json
            try map.context.json = Crust.map(to: json, fromField: field, viaKey: map.key, mapping: map.key.mapping)
            
        case .fromJSON:
            let fieldCopy = field
            let (newObjects, _) = try mapFromJsonToSequence(map: map) {
                fieldCopy.contains($0)
            }
            
            switch map.key.collectionUpdatePolicy.insert {
            case .append:
                field.append(contentsOf: newObjects)
                

                    }
                    
                    try deletion(orphans).forEach {
                        try binding.key.mapping.delete(obj: $0)
                    }
                }
            }
        }
    }
    catch let error as NSError {
        binding.context.error = error
    }
    
    return binding.context
}

// Gets all newly mapped data and returns it in an array, caller can decide to append and what-not.
