export function prop ( object , name , f ) { Object . defineProperty ( object , name , { configurable : true , enumerable : true , get ( ) { const value = f . call ( this ) ; this [ name ] = value ; return value ; } , set < V > ( value ) { Object . defineProperty ( this , name , { configurable : true , enumerable : true , value , writable : true , } ) ; } , } ) ; } export function value < T > ( f ) { let value ; return ( ) : T => { if ( value !== undefined ) return value ; value = f ( ) ; return value ; } ; }