function once(func) {
    var result,
        ran = false;

    return function() {
      if (ran) {
        return result;
      }
      ran = true;
      result = func.apply(this, arguments);

      // clear the `func` variable so the function may be garbage collected
      func = null;
      return result;
    };
  }
Creates a new function that is restricted to one execution. Repeat calls to
the function will return the value of the first call.

@static
@memberOf _
@category Functions
@param {Function} func The function to restrict.
@returns {Function} Returns the new restricted function.
@example

var initialize = _.once(createApplication);
initialize();
initialize();
// Application is only created once.