Source/Fusion/Core/ObservableList/SumTree.Operations.cs
/// <summary>
/// Return a new tree with the value at index replaced with value. O(log n).
/// </summary>
Return a new tree with the value at index replaced with value.
Return a new tree with the value at index replaced with value .
public SumTree<T> ReplaceAt(int index, T value)
		{
			if (index < 0 || index >= Count)
				throw new IndexOutOfRangeException("index");
			return _tree.MatchWith(
				tree => NonEmpty(ReplaceAtInner(0, tree, Count, index, value), Count),
				() =>
				{
					throw new Exception("SumTree.ReplaceAt: Impossible");
				});
		}
public SumTree < T > ReplaceAt ( int index , T value ) { if ( index < 0 || index >= Count ) throw new IndexOutOfRangeException ( " " ) ; return _tree . MatchWith ( tree => NonEmpty ( ReplaceAtInner ( 0 , tree , Count , index , value ) , Count ) , ( ) => { throw new Exception ( " " ) ; } ) ; }
Return a new tree with the value at index replaced with value.
Return a new tree with the value at index replaced with value .
index
int
value
T