Commit 8af85fa
committed
Improve the documentation of
I believe the documentation is currently a little misleading.
For example, in the docs for `filter()`:
> If the closure returns `false`, it will try again, and call the closure on
> the next element, seeing if it passes the test.
This kind of implies that if the closure returns true then we *don't* "try
again" and no further elements are considered. In actuality that's not the
case, every element is tried regardless of what happened with the previous
element.
This change tries to clarify that by removing the uses of "try again"
altogether.filter() and filter_map().1 parent 7d289ae commit 8af85fa
1 file changed
+8
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
656 | 654 | | |
657 | 655 | | |
658 | 656 | | |
| |||
719 | 717 | | |
720 | 718 | | |
721 | 719 | | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
| 720 | + | |
| 721 | + | |
727 | 722 | | |
728 | | - | |
729 | | - | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
730 | 726 | | |
731 | 727 | | |
732 | 728 | | |
733 | 729 | | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | 730 | | |
741 | 731 | | |
742 | 732 | | |
| |||
0 commit comments