/**
 * A representation for a value that may not be available until the current
 * transaction is closed.
 */ export class Lazy < A > { constructor ( f ) { this . f = f ; } private f : ( ) => A ; /**
     * Get the value if available, throwing an exception if not.
     * In the general case this should only be used in subsequent transactions to
     * when the Lazy was obtained.
     */ get ( ) { return this . f ( ) ; } param f map < B > ( f ) { return new Lazy < B > ( ( ) => { return f ( this . f ( ) ) ; } ) ; } /**
     * Lift a binary function into lazy values, so the returned Lazy reflects
     * the value of the function applied to the input Lazys' values.
     */ lift < B , C > ( b , f ) { return new Lazy < C > ( ( ) => { return f ( this . f ( ) , b . f ( ) ) ; } ) ; } /**
     * Lift a ternary function into lazy values, so the returned Lazy reflects
     * the value of the function applied to the input Lazys' values.
     */ lift3 < B , C , D > ( b , c , f ) { return new Lazy < D > ( ( ) => { return f ( this . f ( ) , b . f ( ) , c . f ( ) ) ; } ) ; } /**
     * Lift a quaternary function into lazy values, so the returned Lazy reflects
     * the value of the function applied to the input Lazys' values.
     */ lift4 < B , C , D , E > ( b , c , d , f ) { return new Lazy < E > ( ( ) => { return f ( this . f ( ) , b . f ( ) , c . f ( ) , d . f ( ) ) ; } ) ; } }