 import Foundation
 import ReactiveCocoa
 
+/// `DataSource` implementation that is composed of a mutable array
+/// of other dataSources (called inner dataSources).
+///
+/// See `CompositeDataSource` for details.
+///
+/// The array of innerDataSources can be modified by calling methods that perform
+/// individual changes and instantly make the dataSource emit
+/// a corresponding dataChange.
 public final class MutableCompositeDataSource: DataSource {
 
 	public let changes: Signal<DataChange, NoError>

		return self._innerDataSources.value[index].leafDataSourceAtIndexPath(innerPath)
	}

	public func insertDataSource(dataSource: DataSource, atIndex index: Int) {
		let sections = self.sectionsOfDataSource(dataSource, atIndex: index)
		self._innerDataSources.value.insert(dataSource, atIndex: index)

		}
	}

	/// Moves an inner dataSource at a given index to another index
	/// and emits a batch of `DataChangeMoveSection` for its sections.
	public func moveDataSourceAtIndex(index oldIndex: Int, toIndex newIndex: Int) {
		let oldLocation = mapOutside(self._innerDataSources.value, oldIndex)(innerSection: 0)
		let dataSource = self._innerDataSources.value.removeAtIndex(oldIndex)
