Skip to contents

[Stable]

Usage

is_success_and(x, fn)

Arguments

x

The object to test.

fn

A single argument predicate function that accepts x as its argument.

Value

Either TRUE or FALSE.

See also

Examples

Success(10) |> is_success_and(~ unwrap(.x) == 10)
#> [1] TRUE
Failure("OOps!") |> is_success_and(~ unwrap(.x) == 10)
#> [1] FALSE
Some(10) |> is_success_and(~ unwrap(.x) == 10)
#> [1] FALSE
Nothing() |> is_success_and(~ unwrap(.x) == 10)
#> [1] FALSE