replace method
Implementation
@useCopy
IList<T> replace(int index, T value) {
// TODO: Still need to implement efficiently.
var newList = toList(growable: false);
newList[index] = value;
return IList._unsafeFromList(newList, config: config);
}