`Result.Err` recovering
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 48
- Forks
- 14
- Avg merge
- 4h 14m
- Merged PRs (30d)
- 1
Description
Currently there's only
Result.withDefault :
a -> Result x a -> a
which the issue suggests to replace with
-
Result.valueElseOnError/recover : (x -> a) -> Result x a -> awhich is lazy by default and makes it nearly impossible to forget error values.
-
additionally, an
andThenbut for the error case would be a common helpful operationResult.onErrorTry/recoverTry : (x -> Result a y) -> Result x a -> Result y a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing Result.withDefault implementation and the surrounding Result API in the core package. Review how error-handling helpers are named and tested, then determine whether the proposed recovery and error-retry operations fit the package's conventions; done means the agreed API is implemented with coverage for its lazy recovery and error-case behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100