 	}
 
 	@final func filter(initialValue: T, pred: T -> Bool) -> Observable<T> {
-		return self
-			.map { value in
+		return Observable(initialValue: initialValue) { send in
+			return self.observe { value in
 				if pred(value) {
-					return value
-				} else {
-					return nil
-				}
-			}
-			.removeNil(identity, initialValue: initialValue)
+					send(value)
+				}
+			}
+		}
 	}
 
 	@final func skipRepeats<U: Equatable>(evidence: Observable<T> -> Observable<U>) -> Observable<U> {

		}
	}

	@final func mapAccumulate<S, U>(initialState: S, _ f: (S, T) -> (S?, U)) -> Observable<U> {
		return Observable<U> { send in
			let state = Atomic(initialState)
			let selfDisposable = SerialDisposable()

			selfDisposable.innerDisposable = self.observe { value in
				let (maybeState, newValue) = f(state, value)
				send(newValue)

				if let s = maybeState {
					state.value = s
				} else {
					selfDisposable.dispose()
				}
			}

			return selfDisposable
		}
	}

	@final func removeNil<U>(evidence: Observable<T> -> Observable<U?>, initialValue: U) -> Observable<U> {
		return Observable<U>(initialValue: initialValue) { send in
			return evidence(self).observe { maybeValue in
				if let value = maybeValue {

	}

	@final func map<U>(f: T -> U) -> Observable<U> {
		return Observable<U> { send in
			return self.observe { value in send(f(value)) }
		}
	}

	@final func scan<U>(initialValue: U, _ f: (U, T) -> U) -> Observable<U> {
		let previous = Atomic(initialValue)

		return Observable<U> { send in
			return self.observe { value in
				let newValue = f(previous.value, value)
				send(newValue)

				previous.value = newValue
			}
		}
	}

	@final func take(count: Int) -> Observable<T> {
		assert(count > 0)

		let soFar = Atomic(0)

		return Observable { send in
			let selfDisposable = SerialDisposable()

			selfDisposable.innerDisposable = self.observe { value in
				let orig = soFar.modify { $0 + 1 }
				if orig < count {
					send(value)
				} else {
					selfDisposable.dispose()
				}
			}

			return selfDisposable
		}
	}

	@final func takeWhile(initialValue: T, _ pred: T -> Bool) -> Observable<T> {
		return Observable(initialValue: initialValue) { send in
			let selfDisposable = SerialDisposable()

			selfDisposable.innerDisposable = self.observe { value in
				if pred(value) {
					send(value)
				} else {
					selfDisposable.dispose()
				}
			}

			return selfDisposable
		}
	}

	@final func combinePrevious(initialValue: T) -> Observable<(T, T)> {
		let previous = Atomic(initialValue)

		return Observable<(T, T)> { send in
			return self.observe { value in
				let orig = previous.swap(value)
				send((orig, value))
			}
		}
	}

	@final func skip(count: Int) -> Observable<T?> {
		let soFar = Atomic(0)

		return skipWhile { _ in
			let orig = soFar.modify { $0 + 1 }
			return orig < count
		}
	}

	@final func skipWhile(pred: T -> Bool) -> Observable<T?> {
		return Observable<T?>(initialValue: nil) { send in
			let skipping = Atomic(true)

			return self.observe { value in
				if skipping.value && pred(value) {
					send(nil)
				} else {
					skipping.value = false
					send(value)
				}
			}
		}
	}
