diff options
author | Louis Pilfold <louis@lpil.uk> | 2024-12-05 23:49:19 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-12-05 23:49:19 +0000 |
commit | cdb45f406f0ffd97245cae2deeca4f376b272a6f (patch) | |
tree | 72f786f2b2c4b5d4bb619b4f1bf7d5b783cf4da5 | |
parent | 448d45a7a5287d90d211b5387f565318fbe2e90e (diff) | |
download | gleam_stdlib-cdb45f406f0ffd97245cae2deeca4f376b272a6f.tar.gz gleam_stdlib-cdb45f406f0ffd97245cae2deeca4f376b272a6f.zip |
Changes!
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | src/gleam/list.gleam | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 16dfd46..852f513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,9 @@ ## Unreleased -- Comparing two `Dict`s of equal size has been optimised on the JavaScript - target. - +- Improved the performance of comparing two `Dict`s of equal size on the + JavaScript target. - Improved the performance of `string.drop_start`. - - Improved the performance of `list.strict_zip`. ## v0.45.0 - 2024-11-28 diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam index 97ff912..5f537b9 100644 --- a/src/gleam/list.gleam +++ b/src/gleam/list.gleam @@ -1096,7 +1096,7 @@ fn strict_zip_loop( acc: List(#(a, b)), ) -> Result(List(#(a, b)), Nil) { case one, other { - [], [] -> Ok(acc |> reverse) + [], [] -> Ok(reverse(acc)) [], _ | _, [] -> Error(Nil) [first_one, ..rest_one], [first_other, ..rest_other] -> strict_zip_loop(rest_one, rest_other, [#(first_one, first_other), ..acc]) |