arrow-core-data / arrow.core / contains
fun <A, B>
EitherOf
<A, B>.contains(elem: B):
Boolean
Returns true
if this is a Either.Right and its value is equal to elem
(as determined by ==
),
returns false
otherwise.
Example:
Right("something").contains("something") // Result: true
Right("something").contains("anything") // Result: false
Left("something").contains("something") // Result: false
elem
- the element to test.
Return
true
if the option has an element that is equal (as determined by ==
) to elem
, false
otherwise.
Do you like Arrow?
✖