code: function debounce(f, delay) {
    var timeoutId = null;
  
    return function debounceExecute_() {
      clearTimeout(timeoutId);
      var lastArgs = arguments;
  
      timeoutId = setTimeout(function() {
        timeoutId = null;
        f.apply(null, lastArgs);
      }, delay);
    };
  }
docs: Debounce a function.
  @param {function} f The function.
  @param {number} delay The delay in ms.
  @return {function} A function which calls the passed-in function debounced.