initialValue method

ValueCell<T> initialValue(
  1. ValueCell<T> value
)

Returns a cell that evaluates to the value of value when the value of this is uninitialized.

The returned cell evaluates to the value of the cell value if this cell throws an UninitializedCellError or PendingAsyncValueError exception.

A keyed cell is returned, which is unique for a given this and value.

Implementation

ValueCell<T> initialValue(ValueCell<T> value) =>
    onError<UninitializedCellError>(value)
        .loadingValue(value);