For example,
function MyObject() {
this.someFunction = function(x) {
var a = someComplexCalculation();
this.someFunction = function(y) {
return a + y;
};
return this.someFunction(x);
}
}
Pretty sweet.
