Skip to contents

Map a function over a list and filter only 'Just' values

Usage

filter_map(.l, .f, ...)

Arguments

.l

List of values

.f

A maybe returning function to apply to the maybe values

...

Named arguments for the function .f

Value

A list of values

Examples

filter_map(list(-1, "2", 9), maybe(sqrt))
#> [[1]]
#> [1] 3
#>