Skip to content

Commit 35d5c73

Browse files
sportolpil
authored andcommitted
Rename helper function to do_index_fold
1 parent 107ce9b commit 35d5c73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gleam/list.gleam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,11 @@ pub fn fold_right(list: List(a), from initial: b, with fun: fn(a, b) -> b) -> b
454454
}
455455
}
456456

457-
fn index_fold_(over: List(a), acc: b, with: fn(Int, a, b) -> b, index: Int) -> b {
457+
fn do_index_fold(over: List(a), acc: b, with: fn(Int, a, b) -> b, index: Int) -> b {
458458
case over {
459459
[] -> acc
460460
[first, ..rest] ->
461-
index_fold_(rest, with(index, first, acc), with, index + 1)
461+
do_index_fold(rest, with(index, first, acc), with, index + 1)
462462
}
463463
}
464464

@@ -476,7 +476,7 @@ pub fn index_fold(
476476
from initial: b,
477477
with fun: fn(Int, a, b) -> b,
478478
) -> b {
479-
index_fold_(over, initial, fun, 0)
479+
do_index_fold(over, initial, fun, 0)
480480
}
481481

482482
/// A variant of fold that might fail.

0 commit comments

Comments
 (0)