Skip to content

Commit

Permalink
Update result.gleam to remove inoperable examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmcgimpsey authored and lpil committed Oct 19, 2023
1 parent 577697a commit b3f6733
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/gleam/result.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ pub fn flatten(result: Result(Result(a, e), e)) -> Result(a, e) {
/// ```
///
/// ```gleam
/// > try(yield_ok_containing_1(), fn(x) { Ok(x + 1) })
/// Ok(2)
/// ```
///
/// ```gleam
/// > try(Ok(1), fn(_) { Error("Oh no") })
/// Error("Oh no")
/// ```
Expand All @@ -160,11 +155,6 @@ pub fn flatten(result: Result(Result(a, e), e)) -> Result(a, e) {
/// Error(Nil)
/// ```
///
/// ```gleam
/// > try(yield_deliberate_error(), fn(x) { Ok(x + 1) })
/// Error(Deliberate)
/// ```
///
pub fn try(
result: Result(a, e),
apply fun: fn(a) -> Result(b, e),
Expand Down

0 comments on commit b3f6733

Please sign in to comment.