optionally2<V> method

  1. @deprecated
Using<T> optionally2<V>(
  1. T mapper(
    1. T value,
    2. V optional
    ),
  2. Optional<V> optional
)

Implementation

@deprecated
Using<T> optionally2<V>(final T Function(T value, V optional) mapper, final Optional<V> optional) {
  return Using<T>(optional.map((opt) => mapper(value, opt)).orElseGet(value));
}