Skip to content

Commit

Permalink
Trivially update order in which we transform the result
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephTLyons committed Oct 17, 2024
1 parent a5ef5e6 commit cf967ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lenient_parse.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ pub fn to_float(text: String) -> Result(Float, ParseError) {

text
|> int.parse
|> result.replace_error(GleamIntParseError)
|> result.map(int.to_float)
|> result.replace_error(GleamIntParseError)
}

/// Converts a string to an integer using a more lenient parsing method than gleam's `int.parse()`.
Expand Down

0 comments on commit cf967ab

Please sign in to comment.