Hi everyone,
I'd like to discuss the relation between RangeReplaceableCollection and
MutableCollection
MutableCollection is a Collection type that can { set } any element with
subscript(position: Index). (and also { set } for subscript(range:
Range<Index>))
RangeReplaceableCollection requires a function replaceRange(_:with:)
If a type conforms to RangeReplaceableCollection, it means any of its range can
be replaced, that includes the situation to replace only one element.
So if some type conforms to RangeReplaceableCollection, it is sufficient to be
a MutableCollection.
So I think the RangeReplaceableCollection should conforms to MutableCollection
should inherits from MutableCollection.
Thanks!
Jiannan
_______________________________________________
swift-corelibs-dev mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev