2015-10-28 14:36:45 +03:00
|
|
|
const {slice} = Array.prototype;
|
2014-08-01 00:29:35 +04:00
|
|
|
|
2015-08-19 14:55:40 +03:00
|
|
|
export default function (/* func, args, thisArg */) {
|
2015-10-28 14:36:45 +03:00
|
|
|
let args = slice.call(arguments);
|
|
|
|
let func = args.shift();
|
|
|
|
let thisArg = args.pop();
|
2014-08-01 00:29:35 +04:00
|
|
|
|
|
|
|
function bound() {
|
|
|
|
return func.apply(thisArg, args);
|
|
|
|
}
|
|
|
|
|
|
|
|
return bound;
|
|
|
|
}
|