var builder = function ( klass, parameters ) {
var o = Object.create( klass.prototype );
klass.apply( o, parameters );
return o;
};
// Show time
var Foo = function ( n ) {
this.n = n;
};
Foo.prototype.show = function ( ) {
print( this.n );
};
var instance = builder( Foo, [ 42 ] );
instance.show( );
CnZhciBidWlsZGVyID0gZnVuY3Rpb24gKCBrbGFzcywgcGFyYW1ldGVycyApIHsKICAgIHZhciBvID0gT2JqZWN0LmNyZWF0ZSgga2xhc3MucHJvdG90eXBlICk7CiAgICBrbGFzcy5hcHBseSggbywgcGFyYW1ldGVycyApOwogICAgcmV0dXJuIG87Cn07CgovLyBTaG93IHRpbWUKCnZhciBGb28gPSBmdW5jdGlvbiAoIG4gKSB7CiAgICB0aGlzLm4gPSBuOwp9OwoKRm9vLnByb3RvdHlwZS5zaG93ID0gZnVuY3Rpb24gKCApIHsKICAgIHByaW50KCB0aGlzLm4gKTsKfTsKCnZhciBpbnN0YW5jZSA9IGJ1aWxkZXIoIEZvbywgWyA0MiBdICk7Cmluc3RhbmNlLnNob3coICk7Cg==