 		}
 	}
 
+	/// Performs the given action whenever an enumeration pass is disposed of
+	/// (whether it completed successfully, terminated from an error, or was
+	/// manually disposed).
 	@final func doDisposed(action: () -> ()) -> Enumerable<T> {
 		return Enumerable { send in
 			let disposable = CompositeDisposable()

		}
	}

	@final func takeWhile(pred: T -> Bool) -> Enumerable<T> {
		return self
			.mapAccumulate(true) { (taking, value) in


/// A pull-driven stream that executes work when an enumerator is attached.
class Enumerable<T> {
	/// Something capable of receiving the events sent by an Enumerable.
	///
	/// After receiving `Error` or `Completed` events, Enumerators should ignore
	/// all further events.
	typealias Enumerator = Event<T> -> ()

	@final let _enumerate: Enumerator -> Disposable?

	/// Initializes an Enumerable that will run the given action whenever an
	/// Enumerator is attached, and optionally return a disposable that can be
	/// used to cancel the work.
	init(enumerate: Enumerator -> Disposable?) {
		_enumerate = enumerate
	}

	/// Creates an Enumerable that will immediately complete.
	@final class func empty() -> Enumerable<T> {
		return Enumerable { send in
			send(.Completed)
