define(['./stream'], function(Stream) {
    'use strict';

    /**
     * @param {Stream} stream
     * @param {Number} wait
     * @return {Stream}
     */
    return function debounce(stream, wait) {
        return new Stream(function(sinkValue, sinkError, sinkComplete) {
            var timeout, completeInterval;
            stream.on(function(value, next) {
                if (timeout) {
                    clearTimeout(timeout);
                }

                timeout = setTimeout(function() {
                    sinkValue(
                        value,
                        Stream.streamable(next)
                            ? debounce(next, wait)
                            : Stream.stop
                    );
                }, wait);

            }, sinkError, function() {
                if (!timeout) {
                    return sinkComplete();
                }

                completeInterval = setInterval(function() {
                    if (!timeout) {
                        clearInterval(completeInterval);
                        sinkComplete();
                    }
                }, wait);

            });
        });
    };
});

@@ -351,18 +351,12 @@
 alue
-, next
 ) %7B%0A
+
     
@@ -528,201 +528,13 @@
 lue(
-%0A                        value,%0A                        Stream.streamable(next)%0A                            ? debounce(next, wait)%0A                            : Stream.stop%0A                    
+value
 );%0A 

fix debouse stream