diff options
author | Julian Schurhammer <julian.schurhammer@gmail.com> | 2023-12-04 11:49:57 +1300 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2023-12-09 09:57:32 +0000 |
commit | eaa795fe6597f8bd9b8b95045f293ff5e81dd96d (patch) | |
tree | f149743a18c9121ddef75ea9c100ca2b3f721daa /test | |
parent | e261f0fde8fb3b86830cc0fc5db039378cfb3d9e (diff) | |
download | gleam_stdlib-eaa795fe6597f8bd9b8b95045f293ff5e81dd96d.tar.gz gleam_stdlib-eaa795fe6597f8bd9b8b95045f293ff5e81dd96d.zip |
list.index_map: change callback signature
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/list_test.gleam | 6 |
1 files changed, 3 insertions, 3 deletions
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)]) } |