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

View source: R/maybe.R

filter_mapR Documentation

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

Description

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))

armcn/maybe documentation built on Aug. 23, 2023, 8:55 p.m.