From eaa795fe6597f8bd9b8b95045f293ff5e81dd96d Mon Sep 17 00:00:00 2001 From: Julian Schurhammer Date: Mon, 4 Dec 2023 11:49:57 +1300 Subject: list.index_map: change callback signature --- test/gleam/list_test.gleam | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index 0bebe2f..a89add7 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -697,14 +697,14 @@ pub fn sort_test() { } pub fn index_map_test() { - list.index_map([3, 4, 5], fn(i, x) { #(i, x) }) + list.index_map([3, 4, 5], fn(x, i) { #(i, x) }) |> should.equal([#(0, 3), #(1, 4), #(2, 5)]) - let f = fn(i, x) { #(x, i) } + let f = fn(x, i) { #(x, i) } list.index_map(["a", "b"], f) |> should.equal([#("a", 0), #("b", 1)]) - let f = fn(i, x) { #(x, i) } + let f = fn(x, i) { #(x, i) } list.index_map(["a", "b", "c"], f) |> should.equal([#("a", 0), #("b", 1), #("c", 2)]) } -- cgit v1.2.3