Skip to content

Fix typo #3202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-for-python-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ Some informational and mathematical methods:
| `c.find(p)` | Returns the first element that matches `p`. The element is returned as `Option[A]`. |
| `c.min` | Returns the smallest element from the collection. (Can throw _java.lang.UnsupportedOperationException_.) |
| `c.max` | Returns the largest element from the collection. (Can throw _java.lang.UnsupportedOperationException_.) |
|`c slice(from, to)` | Returns the interval of elements beginning at element `from`, and ending at element `to`. |
| `c.slice(from, to)` | Returns the interval of elements beginning at element `from`, and ending at element `to`. |
| `c.sum` | Returns the sum of all elements in the collection. (Requires an `Ordering` be defined for the elements in the collection.) |

Here are a few examples that demonstrate how these methods work on a list:
Expand Down
2 changes: 1 addition & 1 deletion _zh-cn/overviews/scala3-book/scala-for-python-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ Scala 集合类有超过 100 种功能方法来简化您的代码。
| `c.find(p)` | 返回匹配 `p` 的第一个元素。该元素以 `Option[A]` 的形式返回。 |
| `c.min` | 返回集合中的最小元素。 (可以抛出_java.lang.UnsupportedOperationException_。)|
| `c.max` | 返回集合中的最大元素。 (可以抛出_java.lang.UnsupportedOperationException_。)|
| `c slice(from, to)` | 返回从元素 `from` 开始到元素 `to` 结束的元素间隔。 |
| `c.slice(from, to)` | 返回从元素 `from` 开始到元素 `to` 结束的元素间隔。 |
| `c.sum` | 返回集合中所有元素的总和。 (需要为集合中的元素定义 `Ordering`。) |

以下是一些示例,展示了这些方法如何在列表上工作:
Expand Down