aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Serrano <mlsv89@gmail.com>2022-04-23 18:43:13 +0200
committerLouis Pilfold <louis@lpil.uk>2022-04-30 18:23:56 +0100
commit83c3b6c4bd79b9be858011f05683634469c06458 (patch)
tree9f0e21bd820b1e10e9116598ef3167e03fca366c
parent480777dc4f52410ba8619ce63e5cf1d3f2db125a (diff)
downloadgleam_stdlib-83c3b6c4bd79b9be858011f05683634469c06458.tar.gz
gleam_stdlib-83c3b6c4bd79b9be858011f05683634469c06458.zip
Fix map_fold example
-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 9c0cf24..9c554f7 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -309,9 +309,9 @@ pub fn map(list: List(a), with fun: fn(a) -> b) -> List(b) {
/// > map_fold(
/// over: [1, 2, 3],
/// from: 100,
-/// with: fn(memo, i) { #(i * 2, memo + i) }
+/// with: fn(memo, i) { #(memo + i, i * 2) }
/// )
-/// #([2, 4, 6], 106)
+/// #(106, [2, 4, 6])
/// ```
///
pub fn map_fold(