The lazy function is a higher-order utility function that allows the creation of a lazily-initialized object.
lazy
It takes a function fn as an argument and returns an object with a single property value.
fn
value
The property value is initialized by calling fn only when it is accessed for the first time.
The
lazyfunction is a higher-order utility function that allows the creation of a lazily-initialized object.It takes a function
fnas an argument and returns an object with a single propertyvalue.The property
valueis initialized by callingfnonly when it is accessed for the first time.