mirror of
https://github.com/sigmasternchen/gleam-community-maths
synced 2025-03-15 07:59:01 +00:00
🐛 Fix bug arising for breaking list.index_map change.
This commit is contained in:
parent
5c74fa8b7d
commit
7fc5dc58b7
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue