exists method

bool exists(
  1. bool test(
    1. R right
    )
)

Returns true when this is a Right and test passes.

Implementation

bool exists(bool Function(R right) test) => fold((left) => false, test);