Construct a Predicate Function
Examples
p <- predicate(function(v) v >= 3)
p(2)
#> [1] FALSE
p(3)
#> [1] TRUE
x <- as_flexseq(letters[1:5])
locate_by_predicate(x, p, ".size")
#> $found
#> [1] TRUE
#>
#> $elem
#> [1] "c"
#>
Construct a Predicate Function
p <- predicate(function(v) v >= 3)
p(2)
#> [1] FALSE
p(3)
#> [1] TRUE
x <- as_flexseq(letters[1:5])
locate_by_predicate(x, p, ".size")
#> $found
#> [1] TRUE
#>
#> $elem
#> [1] "c"
#>