-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Like andThen
, but it can fall back to the original value if the function fails.
andThenAttempt : (a -> Maybe a) -> Maybe a -> Maybe a
andThenAttempt f a =
a
|> Maybe.andThen f
|> orElse a
This would require some investigation to see if it's a common enough use case to include. If you would use this in your projects, comment with your use case.
Metadata
Metadata
Assignees
Labels
No labels