if(embedStylesPrinted != true) {document.write('');}var embedStylesPrinted = true;var content = '
Function.prototype.method = function (name, func) {
if (!this.prototype[name]){
this.prototype[name] = func;
return this;
}
};
if (typeof Object.create !== 'function'){
Object.create = function (o) {
var F = function () {};
F.prototype = o;
return new F();
};
}
function Maybe (obj){
return function () {
return obj;
};
}
Function.method('and', function (){
if (arguments.length > 0){
var value = this();
var name = arguments[0];
if (value){
switch(typeof name){
case 'function':
return function () {
return name.apply(value);
};
case 'string':
return function () {
return value[name];
};
}
}
}
return function () {
return null;
};
});
Function.method('result', function (){
if (typeof this === 'function'){
return this.apply(this);
}
else {
return this;
}
});