Skip to content

Commit

Permalink
Update documentation of apply, map, and fold methods on linked list
Browse files Browse the repository at this point in the history
  • Loading branch information
hmcalister committed Dec 12, 2024
1 parent 8ed9f7c commit 924e41a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions list/LinkedList/linkedlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func ForwardMap[T any](list *LinkedList[T], f func(item T) T) {
}
}

// Iterate over the give list and apply the function f to it.
// Iterate over the list and apply the function f to it.
// The function f also takes the current value of the accumulator.
// The results of f become the new value of the accumulator at each step.
//
Expand Down Expand Up @@ -214,7 +214,7 @@ func ReverseMap[T any](list *LinkedList[T], f func(item T) T) {
}
}

// Iterate over the give list and apply the function f to it.
// Iterate over the list and apply the function f to it.
// The function f also takes the current value of the accumulator.
// The results of f become the new value of the accumulator at each step.
//
Expand Down

0 comments on commit 924e41a

Please sign in to comment.