From cdb45f406f0ffd97245cae2deeca4f376b272a6f Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 5 Dec 2024 23:49:19 +0000 Subject: Changes! --- CHANGELOG.md | 6 ++---- 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]) -- cgit v1.2.3