aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gleam/list.gleam4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index 972da23..dc03ec1 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -251,7 +251,7 @@ pub fn map(list: List(a), with fun: fn(a) -> b) -> List(b) {
/// ## Examples
///
/// ```
-/// > map_reduce(
+/// > map_fold(
/// over: [1, 2, 3],
/// from: 100,
/// with: fn(i, memo) { tuple(i * 2, memo + i) }
@@ -259,7 +259,7 @@ pub fn map(list: List(a), with fun: fn(a) -> b) -> List(b) {
/// tuple([2, 4, 6], 106)
/// ```
///
-pub fn map_reduce(
+pub fn map_fold(
over list: List(a),
from memo: memo,
with fun: fn(a, memo) -> tuple(b, memo),