Skip to content

gleam/result: Short-circuiting guards #4174

Answered by lpil
silby asked this question in Questions & support
Jan 14, 2025 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

To me that reads as another way to write map_error, which is common and well understood in Gleam. We try not to have multiple ways to do the same thing, and we want to encourage people to have the errors constructed in the auxiliary functions rather than at the call-site where possible, so I don't think this is immediately clearly beneficial.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@silby
Comment options

@lpil
Comment options

lpil Jan 20, 2025
Maintainer

@silby
Comment options

@lpil
Comment options

lpil Jan 20, 2025
Maintainer

Answer selected by silby
@silby
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants