 
 /// limit continuous progress (reaction) for `timeInterval` seconds when first progress is triggered
 /// (see also: underscore.js throttle)
-public func throttle<T>(timeInterval: TimeInterval) -> (upstream: Stream<T>) -> Stream<T> {
+public func throttle<T>(_ timeInterval: TimeInterval) -> (upstream: Stream<T>) -> Stream<T> {
     return { (upstream: Stream<T>) in
         return Stream<T> { progress, fulfill, reject, configure in
             var canceller: Canceller? = nil


/// delay `progress` and `fulfill` for `timerInterval * eachProgressCount` seconds
/// (incremental delay with start at t = 0sec)
public func interval<T>(timeInterval: TimeInterval) -> (upstream: Stream<T>) -> Stream<T> {
    return { (upstream: Stream<T>) in
        return Stream<T> { progress, fulfill, reject, configure in
            var canceller: Canceller? = nil

    }
}

public func buffer<T>(_ capacity: Int = Int.max) -> (upstream: Stream<T>) -> Stream<[T]> {
    precondition(capacity >= 0)
 
    return { (upstream: Stream<T>) in
