This is what I\'m doing right now.
var foo = function() { var x = someComplicatedComputationThatMayTakeMoreTime(); this.foo = function() { return x; }; ret