You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Filter: add a way to map passing values, like mapFail does for failures #10696
Filter has mapFail to transform a failing result, but nothing to transform a passing one. To filter and then transform a value, the transformation has to be written as a second filter that always succeeds, joined with compose:
flow(f, Result.succeed) reads as a filter that can't fail, which hides that it's a plain mapping. In practice we fell back to a ternary inside Record.filterMap instead of using Filter.
What is the feature you are proposing to solve the problem?
A Filter.map (or mapPass, to mirror mapFail) that transforms the passing value and leaves failures unchanged:
Activity
Leave unset query inputs out of span attributes