isSomeAnd method

bool isSomeAnd(
  1. bool predicate(
    1. T value
    )
)

Checks if the Option contains a value.

Implementation

bool isSomeAnd(bool Function(T value) predicate) {
  if (this is Some<T>) {
    final value = (this as Some<T>).value;
    return predicate(value);
  }
  return false;
}