ifValid
Applies consumer to the cached value and returns the result wrapped in Optional.Some, but only if the value is currently isValid; otherwise, returns Optional.None without forcing a (re)computation.
Applies consumer to the cached value and returns the result wrapped in Optional.Some, but only if the value is currently isValid; otherwise, returns Optional.None without forcing a (re)computation.