Skip to contents

[Stable]

Usage

is_failure_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_failure_and(~ unwrap_fail(.x) == "OOps!")
#> [1] FALSE
Failure("OOps!") |> is_failure_and(~ unwrap_fail(.x) == "OOps!")
#> [1] TRUE
Some(10) |> is_failure_and(~ unwrap_fail(.x) == "OOps!")
#> [1] FALSE
Nothing() |> is_failure_and(~ unwrap_fail(.x) == "OOps!")
#> [1] FALSE