From 7fc5dc58b7c22c14d731ed9d4707570e5c71252d Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Tue, 19 Dec 2023 10:11:09 +0000 Subject: [PATCH] :bug: Fix bug arising for breaking list.index_map change. --- src/gleam_community/maths/piecewise.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gleam_community/maths/piecewise.gleam b/src/gleam_community/maths/piecewise.gleam index ea01e10..6299489 100644 --- a/src/gleam_community/maths/piecewise.gleam +++ b/src/gleam_community/maths/piecewise.gleam @@ -1067,7 +1067,7 @@ pub fn arg_minimum( arr |> list_minimum(compare) arr - |> list.index_map(fn(index: Int, element: a) -> Int { + |> list.index_map(fn(element: a, index: Int) -> Int { case compare(element, min) { order.Eq -> index _ -> -1 @@ -1137,7 +1137,7 @@ pub fn arg_maximum( arr |> list_maximum(compare) arr - |> list.index_map(fn(index: Int, element: a) -> Int { + |> list.index_map(fn(element: a, index: Int) -> Int { case compare(element, max) { order.Eq -> index _ -> -1