Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f0d591

Browse files
committed
reorder Tour of Scala sections more logically
thanks to Stephen Compall for suggesting this; his original pull request (scala#307) couldn't be merged because too much time had passed, but I have followed his suggested ordering here
1 parent a856263 commit 9f0d591

33 files changed

+97
-92
lines changed

tutorials/tour/abstract-types.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ title: Abstract Types
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 2
9-
outof: 35
8+
num: 22
109
languages: [es, ko]
11-
tutorial-next: annotations
12-
tutorial-previous: tour-of-scala
10+
tutorial-next: compound-types
11+
tutorial-previous: inner-classes
1312
---
1413

1514
In Scala, classes are parameterized with values (the constructor parameters) and with types (if classes are [generic](generic-classes.html)). For reasons of regularity, it is not only possible to have values as object members; types along with values are members of objects. Furthermore, both forms of members can be concrete and abstract.

tutorials/tour/annotations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Annotations
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 3
9-
tutorial-next: classes
10-
tutorial-previous: abstract-types
8+
num: 31
9+
tutorial-next: default-parameter-values
10+
tutorial-previous: automatic-closures
1111
---
1212

1313
Annotations associate meta-information with definitions.

tutorials/tour/anonymous-function-syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Anonymous Function Syntax
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 14
9-
tutorial-next: currying
10-
tutorial-previous: nested-functions
8+
num: 6
9+
tutorial-next: higher-order-functions
10+
tutorial-previous: mixin-class-composition
1111
---
1212

1313
Scala provides a relatively lightweight syntax for defining anonymous functions. The following expression creates a successor function for integers:

tutorials/tour/automatic-closures.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Automatic Type-Dependent Closure Construction
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 16
9-
tutorial-next: operators
10-
tutorial-previous: currying
8+
num: 30
9+
tutorial-next: annotations
10+
tutorial-previous: operators
1111
---
1212

1313
Scala allows parameterless function names as parameters of methods. When such a method is called, the actual parameters for parameterless function names are not evaluated and a nullary function is passed instead which encapsulates the computation of the corresponding parameter (so-called *call-by-name* evalutation).

tutorials/tour/case-classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Case Classes
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 5
9-
tutorial-previous: classes
10-
tutorial-next: compound-types
8+
num: 10
9+
tutorial-next: pattern-matching
10+
tutorial-previous: currying
1111
---
1212

1313
Scala supports the notion of _case classes_. Case classes are regular classes which export their constructor parameters and which provide a recursive decomposition mechanism via [pattern matching](pattern-matching.html).

tutorials/tour/classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Classes
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 4
9-
tutorial-next: case-classes
10-
tutorial-previous: compound-types
8+
num: 3
9+
tutorial-next: traits
10+
tutorial-previous: unified-types
1111
---
1212

1313
Classes in Scala are static templates that can be instantiated into many objects at runtime.

tutorials/tour/compound-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Compound Types
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 6
9-
tutorial-next: sequence-comprehensions
10-
tutorial-previous: case-classes
8+
num: 23
9+
tutorial-next: explicitly-typed-self-references
10+
tutorial-previous: abstract-types
1111
---
1212

1313
Sometimes it is necessary to express that the type of an object is a subtype of several other types. In Scala this can be expressed with the help of *compound types*, which are intersections of object types.

tutorials/tour/currying.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Currying
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 15
9-
tutorial-next: automatic-closures
10-
tutorial-previous: anonymous-function-syntax
8+
num: 9
9+
tutorial-next: case-classes
10+
tutorial-previous: nested-functions
1111
---
1212

1313
Methods may define multiple parameter lists. When a method is called with a fewer number of parameter lists, then this will yield a function taking the missing parameter lists as its arguments.

tutorials/tour/default-parameter-values.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
layout: tutorial
3-
title: Default Parameter values
3+
title: Default Parameter Values
44

55
disqus: true
66

77
tutorial: scala-tour
8-
num: 34
8+
num: 32
99
tutorial-next: named-parameters
10-
tutorial-previous: xml-processing
10+
tutorial-previous: annotations
1111
---
1212

1313
Scala provides the ability to give parameters default values that can be used to allow a caller to omit those parameters.

tutorials/tour/explicitly-typed-self-references.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: Explicitly Typed Self References
55
disqus: true
66

77
tutorial: scala-tour
8-
num: 27
9-
tutorial-next: local-type-inference
10-
tutorial-previous: lower-type-bounds
8+
num: 24
9+
tutorial-next: implicit-parameters
10+
tutorial-previous: compound-types
1111
---
1212

1313
When developing extensible software it is sometimes handy to declare the type of the value `this` explicitly. To motivate this, we will derive a small extensible representation of a graph data structure in Scala.

0 commit comments

Comments
 (0)