a subject at this level is not the syntax of particular programming-language constructs, nor clever algorithms for computing particular functions efficiently, nor even the mathematical analysis of algorithms and the foundations of computing, but rather the techniques used to control the intellectual complexity of large software systems.” Structure and Interpretation of Computer Programs
setTimeout(function(){ callback(null, 'two'); }, 100); } ],// optional callback function(err, results){ // the results array will equal ['one','two'] even though // the second function had a shorter timeout. });
key up */var keyups = Rx.Observable.fromEvent(input, 'keyup') .select(function (e) { return e.target.value; }) .where(function (text) { return text.length > 2; });/* Now throttle/debounce the input for 500ms */ var throttled = keyups .throttle(500 /* ms */);/* Now get only distinct values, so we eliminate the arrows */ var distinct = keyups .distinctUntilChanged();