vendor/optional/lodash-0.3.2.js
function wrap(func, wrapper) {
    return function() {
      var args = [func];
      if (arguments.length) {
        push.apply(args, arguments);
      }
      return wrapper.apply(this, args);
    };
  }
function wrap(func, wrapper) {
    return function() {
      var args = [func];
      if (arguments.length) {
        push.apply(args, arguments);
      }
      return wrapper.apply(this, args);
    };
  }
function wrap ( func , wrapper ) { return function ( ) { var args = [ func ] ; if ( arguments . length ) { push . apply ( args , arguments ) ; } return wrapper . apply ( this , args ) ; } ; }
Create a new function that passes the `func` function to the `wrapper`
function as its first argument. Additional arguments are appended to those
passed to the `wrapper` function.

@static
@memberOf _
@category Functions
@param {Function} func The function to wrap.
@param {Function} wrapper The wrapper function.
@param {Mixed} [arg1, arg2, ...] Arguments to append to those passed to the wrapper.
@returns {Function} Returns the new function.
@example

var hello = function(name) { return 'hello: ' + name; };
hello = _.wrap(hello, function(func) {
return 'before, ' + func('moe') + ', after';
});
hello();
// => 'before, hello: moe, after'
Create a new function that passes the func function to the wrapper function as its first argument . Additional arguments are appended to those passed to the wrapper function .