From 82aec2d14a7494120d0054d04d8679190abb7351 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Mon, 12 Apr 2021 13:43:44 +0200 Subject: Rename `map_reduce` to `map_fold` --- test/gleam/list_test.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index fc8ea11..bf93203 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -99,9 +99,9 @@ pub fn map_test() { |> should.equal([0, 8, 10, 14, 6]) } -pub fn map_reduce_test() { +pub fn map_fold_test() { [1, 2, 3, 4] - |> list.map_reduce(from: 0, with: fn(i, acc) { tuple(i * 2, acc + i) }) + |> list.map_fold(from: 0, with: fn(i, acc) { tuple(i * 2, acc + i) }) |> should.equal(tuple([2, 4, 6, 8], 10)) } -- cgit v1.2.3