 ///
 /// Returns a producer that will send values from `producer`, sampled (possibly
 /// multiple times) by `sampler`, then complete once both inputs have completed.
-public func sampleOn<T, E>(sampler: SignalProducer<(), NoError>)(producer: SignalProducer<T, E>) -> SignalProducer<T, E> {
-	return producer.lift(sampleOn)(sampler)
+public func sampleOn<T, E>(sampler: SignalProducer<(), NoError>) -> SignalProducer<T, E> -> SignalProducer<T, E> {
+	return { producer in
+		return producer.lift(sampleOn)(sampler)
+	}
 }
 
 /// Forwards events from `producer` until `trigger` sends a Next or Completed
 /// event, at which point the returned producer will complete.
-public func takeUntil<T, E>(trigger: SignalProducer<(), NoError>)(producer: SignalProducer<T, E>) -> SignalProducer<T, E> {
-	return producer.lift(takeUntil)(trigger)
+public func takeUntil<T, E>(trigger: SignalProducer<(), NoError>) -> SignalProducer<T, E> -> SignalProducer<T, E> {
+	return { producer in
+		return producer.lift(takeUntil)(trigger)
+	}
 }
 
 /// Forwards events from `producer` until `replacement` begins sending events.

}

/// SignalProducer.startWithSignal() as a free function, for easier use with |>.
public func startWithSignal<T, E>(setUp: (Signal<T, E>, Disposable) -> ())(producer: SignalProducer<T, E>) -> () {
	return producer.startWithSignal(setUp)
}

/// SignalProducer.start() as a free function, for easier use with |>.
public func start<T, E, S: SinkType where S.Element == Event<T, E>>(sink: S)(producer: SignalProducer<T, E>) -> Disposable {
	return producer.start(sink)
}

/// SignalProducer.start() as a free function, for easier use with |>.
public func start<T, E>(error: (E -> ())? = nil, completed: (() -> ())? = nil, interrupted: (() -> ())? = nil, next: (T -> ())? = nil)(producer: SignalProducer<T, E>) -> Disposable {
	return producer.start(next: next, error: error, completed: completed, interrupted: interrupted)
}

///
/// Signals started by the returned producer will not send a value until both
/// inputs have sent at least one value each.
public func combineLatestWith<T, U, E>(otherSignalProducer: SignalProducer<U, E>) -> SignalProducer<T, E> -> SignalProducer<(T, U), E> {
	return { producer in
		return producer.lift(combineLatestWith)(otherSignalProducer)
	}
}

internal func combineLatestWith<T, E>(otherSignalProducer: SignalProducer<T, E>) -> SignalProducer<[T], E> -> SignalProducer<[T], E> {
	return { producer in
		return producer.lift(combineLatestWith)(otherSignalProducer)
	}
}

/// Zips elements of two signal producers into pairs. The elements of any Nth
/// pair are the Nth elements of the two input producers.
public func zipWith<T, U, E>(otherSignalProducer: SignalProducer<U, E>) -> SignalProducer<T, E> -> SignalProducer<(T, U), E> {
	return { producer in
		return producer.lift(zipWith)(otherSignalProducer)
	}
}

internal func zipWith<T, E>(otherSignalProducer: SignalProducer<T, E>) -> SignalProducer<[T], E> -> SignalProducer<[T], E> {
	return { producer in
		return producer.lift(zipWith)(otherSignalProducer)
	}
}

/// Combines the values of all the given producers, in the manner described by
