//bind
function bind(fn, ctx) {
return function (a) {
var l = arguments.length;
return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx);
};
}
//entend
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
}