Skip to content

Commit 72e92ad

Browse files
Fix typo, reverse not revert (#184)
1 parent d12121e commit 72e92ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/stdlib/Traversables.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ object Traversables extends AnyFlatSpec with Matchers with org.scalaexercises.de
510510
/** The naive recursive implementation of `reduceRight` is not tail recursive and would lead to a stack overflow if used on larger traversables.
511511
* However, `reduceLeft` can be implemented with tail recursion.
512512
*
513-
* To avoid the potential stack overflow with the naive implementation of `reduceRight` we can easily implement it based on `reduceLeft` by reverting the list and the inverting the reduce function.
513+
* To avoid the potential stack overflow with the naive implementation of `reduceRight` we can easily implement it based on `reduceLeft` by reversing the list and the inverting the reduce function.
514514
* The same applies for folding operations.
515515
*
516516
* There is also a `reduce` (and `fold`) available, which works exactly like `reduceLeft` (and `foldLeft`) and it should be the prefered method to call unless there is a strong reason to use `reduceRight` (or `foldRight`).

0 commit comments

Comments
 (0)