Reference

constructor(current: T, next: () -> T?)

Parameters

current

The value of the reference at the time of reference creation.

next

A function that returns the value of the reference, or null if the reference has become invalid, when later needed.