Skip to content

add html file lines in all files in scala3-book. change overviews links. #2562

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

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/ca-context-bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates Context Bounds in Scala 3.
num: 61
previous-page: types-type-classes
next-page: ca-given-imports

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
21 changes: 13 additions & 8 deletions _zh-cn/overviews/scala3-book/ca-contextual-abstractions-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This chapter provides an introduction to the Scala 3 concept of Con
num: 58
previous-page: types-others
next-page: ca-given-using-clauses

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -72,11 +77,11 @@ Scala 3 中的这些更改实现了术语推理与语言其余部分的更好分
本章将在以下各节中介绍其中的许多新功能。


[givens]: {% link _overviews/scala3-book/ca-given-using-clauses.md %}
[given-imports]: {% link _overviews/scala3-book/ca-given-imports.md %}
[implicit-conversions]: {% link _overviews/scala3-book/ca-implicit-conversions.md %}
[extension-methods]: {% link _overviews/scala3-book/ca-extension-methods.md %}
[context-bounds]: {% link _overviews/scala3-book/ca-context-bounds.md %}
[type-classes]: {% link _overviews/scala3-book/ca-type-classes.md %}
[equality]: {% link _overviews/scala3-book/ca-multiversal-equality.md %}
[contextual-functions]: {% link _overviews/scala3-book/types-dependent-function.md %}
[givens]: {% link _zh-cn/overviews/scala3-book/ca-given-using-clauses.md %}
[given-imports]: {% link _zh-cn/overviews/scala3-book/ca-given-imports.md %}
[implicit-conversions]: {% link _zh-cn/overviews/scala3-book/ca-implicit-conversions.md %}
[extension-methods]: {% link _zh-cn/overviews/scala3-book/ca-extension-methods.md %}
[context-bounds]: {% link _zh-cn/overviews/scala3-book/ca-context-bounds.md %}
[type-classes]: {% link _zh-cn/overviews/scala3-book/ca-type-classes.md %}
[equality]: {% link _zh-cn/overviews/scala3-book/ca-multiversal-equality.md %}
[contextual-functions]: {% link _zh-cn/overviews/scala3-book/types-dependent-function.md %}
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/ca-extension-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates how Extension Methods work in Scala 3.
num: 63
previous-page: ca-given-imports
next-page: ca-type-classes

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
7 changes: 6 additions & 1 deletion _zh-cn/overviews/scala3-book/ca-given-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates how 'given' import statements work in Scala
num: 62
previous-page: ca-context-bounds
next-page: ca-extension-methods

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -45,4 +50,4 @@ object B:
“导入 given”语法的更多示例见 [package 和 import 章节][imports]。


[imports]: {% link _overviews/scala3-book/packaging-imports.md %}
[imports]: {% link _zh-cn/overviews/scala3-book/packaging-imports.md %}
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/ca-given-using-clauses.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates how to use 'given' instances and 'using' cla
num: 59
previous-page: ca-contextual-abstractions-intro
next-page: types-type-classes

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---

Scala 3 offers two important feature for contextual abstraction:
Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/ca-implicit-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates how to implement Implicit Conversions in Sca
num: 66
previous-page: ca-multiversal-equality
next-page: ca-summary

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---

隐式转换由 `scala.Conversion` 类的 `given` 实例定义。
Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/ca-multiversal-equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates how to implement Multiversal Equality in Sca
num: 65
previous-page: ca-type-classes
next-page: ca-implicit-conversions

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/ca-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page provides a summary of the Contextual Abstractions lessons
num: 67
previous-page: ca-implicit-conversions
next-page: concurrency

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
7 changes: 6 additions & 1 deletion _zh-cn/overviews/scala3-book/ca-type-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates how to create and use type classes in Scala
num: 64
previous-page: ca-extension-methods
next-page: ca-multiversal-equality

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -105,4 +110,4 @@ trait HasLegs[A]:
有关如何在 Scala 3 中使用类型类的真实示例,请参阅[多元相等性部分][multiversal]中的 `CanEqual` 讨论。


[multiversal]: {% link _overviews/scala3-book/ca-multiversal-equality.md %}
[multiversal]: {% link _zh-cn/overviews/scala3-book/ca-multiversal-equality.md %}
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/collections-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page introduces the common Scala 3 collections types and some
num: 37
previous-page: collections-intro
next-page: collections-methods

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/collections-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page provides and introduction to the common collections class
num: 36
previous-page: packaging-imports
next-page: collections-classes

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
11 changes: 8 additions & 3 deletions _zh-cn/overviews/scala3-book/collections-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page demonstrates the common methods on the Scala 3 collection
num: 38
previous-page: collections-classes
next-page: collections-summary

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -393,9 +398,9 @@ res1: Int = 24
> 通过这样做,您可以在 `for` 表达式中使用这些集合,还可以利用 Scala 的函数式集合方法。
> 请参阅 [与 Java 交互][interacting] 部分了解更多详细信息。

[interacting]: {% link _overviews/scala3-book/interacting-with-java.md %}
[lambdas]: {% link _overviews/scala3-book/fun-anonymous-functions.md %}
[fp-intro]: {% link _overviews/scala3-book/fp-intro.md %}
[interacting]: {% link _zh-cn/overviews/scala3-book/interacting-with-java.md %}
[lambdas]: {% link _zh-cn/overviews/scala3-book/fun-anonymous-functions.md %}
[fp-intro]: {% link _zh-cn/overviews/scala3-book/fp-intro.md %}
[mut-immut-colls]: {% link _overviews/collections-2.13/overview.md %}
[architecture]: {% link _overviews/core/architecture-of-scala-213-collections.md %}

5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/collections-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page provides a summary of the Collections chapter.
num: 39
previous-page: collections-methods
next-page: fp-intro

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page discusses how Scala concurrency works, with an emphasis o
num: 68
previous-page: ca-summary
next-page: scala-tools

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/control-structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page provides an introduction to Scala's control structures, i
num: 18
previous-page: first-look-at-types
next-page: domain-modeling-intro

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
9 changes: 7 additions & 2 deletions _zh-cn/overviews/scala3-book/domain-modeling-fp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This chapter provides an introduction to FP domain modeling with Sc
num: 22
previous-page: domain-modeling-oop
next-page: methods-intro

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -473,5 +478,5 @@ Pizza(Small, Thin, Seq(Cheese))
- 您可以使用“函数对象”方法并将方法存储在定义的数据类型上
- 您可以使用扩展方法把函数装配到数据模型上

[adts]: {% link _overviews/scala3-book/types-adts-gadts.md %}
[modeling-tools]: {% link _overviews/scala3-book/domain-modeling-tools.md %}
[adts]: {% link _zh-cn/overviews/scala3-book/types-adts-gadts.md %}
[modeling-tools]: {% link _zh-cn/overviews/scala3-book/domain-modeling-tools.md %}
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/domain-modeling-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This chapter provides an introduction to domain modeling in Scala 3
num: 19
previous-page: control-structures
next-page: domain-modeling-tools

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---

本章介绍如何使用 Scala 3 对周围的世界进行建模:
Expand Down
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/domain-modeling-oop.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This chapter provides an introduction to OOP domain modeling with S
num: 21
previous-page: domain-modeling-tools
next-page: domain-modeling-fp

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
9 changes: 7 additions & 2 deletions _zh-cn/overviews/scala3-book/domain-modeling-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This chapter provides an introduction to the available domain model
num: 20
previous-page: domain-modeling-intro
next-page: domain-modeling-oop

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---

Scala 3提供了许多不同的结构,因此我们可以对周围的世界进行建模:
Expand Down Expand Up @@ -693,8 +698,8 @@ def handleMessages(message: Message): Unit = message match
```

[ref-enums]: {{ site.scala3ref }}/enums/enums.html
[adts]: {% link _overviews/scala3-book/types-adts-gadts.md %}
[fp-modeling]: {% link _overviews/scala3-book/domain-modeling-fp.md %}
[adts]: {% link _zh-cn/overviews/scala3-book/types-adts-gadts.md %}
[fp-modeling]: {% link _zh-cn/overviews/scala3-book/domain-modeling-fp.md %}
[creator]: {{ site.scala3ref }}/other-new-features/creator-applications.html
[unapply]: {{ site.scala3ref }}/changed-features/pattern-matching.html
[trait-params]: {{ site.scala3ref }}/other-new-features/trait-parameters.html
7 changes: 6 additions & 1 deletion _zh-cn/overviews/scala3-book/first-look-at-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This page provides a brief introduction to Scala's built-in data ty
num: 17
previous-page: taste-summary
next-page: control-structures

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -264,6 +269,6 @@ val z: Long = y // Error
[reference]: {{ site.scala3ref }}/overview.html
[matchable]: {{ site.scala3ref }}/other-new-features/matchable.html
[interpolation]: {% link _overviews/core/string-interpolation.md %}
[fp]: {% link _overviews/scala3-book/fp-intro.md %}
[fp]: {% link _zh-cn/overviews/scala3-book/fp-intro.md %}
[option-api]: https://scala-lang.org/api/3.x/scala/Option.html
[safe-null]: {{ site.scala3ref }}/experimental/explicit-nulls.html
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/fp-functional-error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This section provides an introduction to functional error handling
num: 45
previous-page: fp-functions-are-values
next-page: fp-summary

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
9 changes: 7 additions & 2 deletions _zh-cn/overviews/scala3-book/fp-functions-are-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This section looks at the use of functions as values in functional
num: 44
previous-page: fp-pure-functions
next-page: fp-functional-error-handling

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -95,5 +100,5 @@ nums.sortWith(_ > _) // List(11, 7, 5, 3, 1)
nums.takeWhile(_ < 6).sortWith(_ < _) // List(1, 3, 5)
```

[hofs]: {% link _overviews/scala3-book/fun-hofs.md %}
[eta]: {% link _overviews/scala3-book/fun-eta-expansion.md %}
[hofs]: {% link _zh-cn/overviews/scala3-book/fun-hofs.md %}
[eta]: {% link _zh-cn/overviews/scala3-book/fun-eta-expansion.md %}
7 changes: 6 additions & 1 deletion _zh-cn/overviews/scala3-book/fp-immutable-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This section looks at the use of immutable values in functional pro
num: 42
previous-page: fp-what-is-fp
next-page: fp-pure-functions

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -66,4 +71,4 @@ val elton = reginald.copy(
> 根据您的需要,您可以创建枚举、traits 或类,而不是 `case` 类。
> 有关详细信息,请参阅[数据建模][modeling]一章。

[modeling]: {% link _overviews/scala3-book/domain-modeling-intro.md %}
[modeling]: {% link _zh-cn/overviews/scala3-book/domain-modeling-intro.md %}
5 changes: 5 additions & 0 deletions _zh-cn/overviews/scala3-book/fp-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This chapter provides an introduction to functional programming in
num: 40
previous-page: collections-summary
next-page: fp-what-is-fp

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down
7 changes: 6 additions & 1 deletion _zh-cn/overviews/scala3-book/fp-pure-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: This section looks at the use of pure functions in functional progr
num: 43
previous-page: fp-immutable-values
next-page: fp-functions-are-values

partof: scala3-book
overview-name: "Scala 3 — Book"
layout: multipage-overview
permalink: "/zh-cn/scala3/book/:title.html"
---


Expand Down Expand Up @@ -103,4 +108,4 @@ def sum(xs: List[Int]): Int = xs match
第二个要点是每个现实世界的应用程序都与外部世界交互。
因此,考虑函数式程序的一种简化方法是,它们由一个纯函数核心组成,其他一些函数把这些纯函数包装起来与外部世界交互。

[eta]: {% link _overviews/scala3-book/fun-eta-expansion.md %}
[eta]: {% link _zh-cn/overviews/scala3-book/fun-eta-expansion.md %}
Loading