8000 Reorder tour; a script for reordering by S11001001 · Pull Request #307 · scala/docs.scala-lang · GitHub
[go: up one dir, main page]

Skip to content

Reorder tour; a script for reordering #307

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Renumber tour pages according to their order of appearance in the mai…
…n tour page.
  • Loading branch information
S11001001 committed Feb 23, 2014
commit e68fd888dda9d51f8d38d731eff00137fffdadbb
2 changes: 1 addition & 1 deletion tutorials/tour/abstract-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Abstract Types
disqus: true

tutorial: scala-tour
num: 2
num: 20
outof: 35
languages: [es]
---
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Annotations
disqus: true

tutorial: scala-tour
num: 3
num: 29
---

Annotations associate meta-information with definitions.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/anonymous-function-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Anonymous Function Syntax
disqus: true

tutorial: scala-tour
num: 14
num: 6
---

Scala provides a relatively lightweight syntax for defining anonymous functions. The following expression creates a successor function for integers:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/automatic-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Automatic Type-Dependent Closure Construction
disqus: true

tutorial: scala-tour
num: 16
num: 28
---

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).
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/case-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Case Classes
disqus: true

tutorial: scala-tour
num: 5
num: 10
---

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).
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Classes
disqus: true

tutorial: scala-tour
num: 4
num: 3
---

Classes in Scala are static templates that can be instantiated into many objects at runtime.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/compound-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Compound Types
disqus: true

tutorial: scala-tour
num: 6
num: 21
---

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.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/currying.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Currying
disqus: true

tutorial: scala-tour
num: 15
num: 9
---

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.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/default-parameter-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Default Parameter values
disqus: true

tutorial: scala-tour
num: 34
num: 31
---

Scala provides the ability to give parameters default values that can be used to allow a caller to omit those parameters.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/explicitly-typed-self-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Explicitly Typed Self References
disqus: true

tutorial: scala-tour
num: 27
num: 22
---

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.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/extractor-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Extractor Objects
disqus: true

tutorial: scala-tour
num: 8
num: 30
---

In Scala, patterns can be defined independently of case classes. To this end, a method named unapply is defined to yield a so-called extractor. For instance, the following code defines an extractor object Twice.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/generic-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Generic Classes
disqus: true

tutorial: scala-tour
num: 9
num: 15
---

Like in Java 5 (aka. [JDK 1.5](http://java.sun.com/j2se/1.5/)), Scala has built-in support for classes parameterized with types. Such generic classes are particularly useful for the development of collection classes.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/higher-order-functions.md
F987
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Higher-order Functions
disqus: true

tutorial: scala-tour
num: 18
num: 7
---

Scala allows the definition of higher-order functions. These are functions that _take other functions as parameters_, or whose _result is a function_. Here is a function `apply` which takes another function `f` and a value `v` and applies function `f` to `v`:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/implicit-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Implicit Parameters
disqus: true

tutorial: scala-tour
num: 10
num: 23
---

A method with _implicit parameters_ can be applied to arguments just like a normal method. In this case the implicit label has no effect. However, if such a method misses arguments for its implicit parameters, such arguments will be automatically provided.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/inner-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Inner Classes
disqus: true

tutorial: scala-tour
num: 11
num: 19
---

In Scala it is possible to let classes have other classes as members. Opposed to Java-like languages where such inner classes are members of the enclosing class, in Scala such inner classes are bound to the outer object. To illustrate the difference, we quickly sketch the implementation of a graph datatype:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/local-type-inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Local Type Inference
disqus: true

tutorial: scala-tour
num: 29
num: 26
---
Scala has a built-in type inference mechanism which allows the programmer to omit certain type annotations. It is, for instance, often not necessary in Scala to specify the type of a variable, since the compiler can deduce the type from the initialization expression of the variable. Also return types of methods can often be omitted since they corresponds to the type of the body, which gets inferred by the compiler.

Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/lower-type-bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Lower Type Bounds
disqus: true

tutorial: scala-tour
num: 26
num: 18
---

While [upper type bounds](upper-type-bounds.html) limit a type to a subtype of another type, *lower type bounds* declare a type to be a supertype of another type. The term `T >: A` expresses that the type parameter `T` or the abstract type `T` refer to a supertype of type `A`.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/mixin-class-composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Mixin Class Composition
disqus: true

tutorial: scala-tour
num: 12
num: 5
---

As opposed to languages that only support _single inheritance_, Scala has a more general notion of class reuse. Scala makes it possible to reuse the _new member definitions of a class_ (i.e. the delta in relationship to the superclass) in the definition of a new class. This is expressed as a _mixin-class composition_. Consider the following abstraction for iterators.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/named-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Named Parameters
disqus: true

tutorial: scala-tour
num: 35
num: 32
---

When calling methods and functions, you can use the name of the variables expliclty in the call, like so:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/nested-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Nested Functions
disqus: true

tutorial: scala-tour
num: 13
num: 8
---

In Scala it is possible to nest function definitions. The following object provides a `filter` function for extracting values from a list of integers that are below a threshold value:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Operators
disqus: true

tutorial: scala-tour
num: 17
num: 27
---

Any method which takes a single parameter can be used as an *infix operator* in Scala. Here is the definition of class `MyBool` which defines three methods `and`, `or`, and `negate`.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/pattern-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Pattern Matching
disqus: true

tutorial: scala-tour
num: 20
num: 11
---

Scala has a built-in general pattern matching mechanism. It allows to match on any sort of data with a first-match policy.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/polymorphic-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Polymorphic Methods
disqus: true

tutorial: scala-tour
num: 21
num: 25
---

Methods in Scala can be parameterized with both values and types. Like on the class level, value parameters are enclosed in a pair of parentheses, while type parameters are declared within a pair of brackets.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/regular-expression-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Regular Expression Patterns
disqus: true

tutorial: scala-tour
num: 22
num: 13
---

## Right-ignoring sequence patterns ##
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/sequence-comprehensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Sequence Comprehensions
disqus: true

tutorial: scala-tour
num: 7
num: 14
---

Scala offers a lightweight notation for expressing *sequence comprehensions*. Comprehensions have the form `for (enumerators) yield e`, where `enumerators` refers to a semicolon-separated list of enumerators. An *enumerator* is either a generator which introduces new variables, or it is a filter. A comprehension evaluates the body `e` for each binding generated by the enumerators and returns a sequence of these values.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Traits
disqus: true

tutorial: scala-tour
num: 24
num: 4
---

Similar to interfaces in Java, traits are used to define object types by specifying the signature of the supported methods. Unlike Java, Scala allows traits to be partially implemented; i.e. it is possible to define default implementations for some methods. In contrast to classes, traits may not have constructor parameters.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/unified-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Unified Types
disqus: true

tutorial: scala-tour
num: 30
num: 2
---

In contrast to Java, all values in Scala are objects (including numerical values and functions). Since Scala is class-based, all values are instances of a class. The diagram below illustrates the class hierarchy.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/upper-type-bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Upper Type Bounds
disqus: true

tutorial: scala-tour
num: 25
num: 17
---

In Scala, [type parameters](generic-classes.html) and [abstract types](abstract-types.html) may be constrained by a type bound. Such type bounds limit the concrete values of the type variables and possibly reveal more information about the members of such types. An _upper type bound_ `T <: A` declares that type variable `T` refers to a subtype of type `A`.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/variances.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Variances
disqus: true

tutorial: scala-tour
num: 31
num: 16
---

Scala supports variance annotations of type parameters of [generic classes](generic-classes.html). In contrast to Java 5 (aka. [JDK 1.5](http://java.sun.com/j2se/1.5/)), variance annotations may be added when a class abstraction is defined, whereas in Java 5, variance annotations are given by clients when a class abstraction is used.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Views
disqus: true

tutorial: scala-tour
num: 32
num: 24
---

[Implicit parameters](implicit-parameters.html) and methods can also define implicit conversions called _views_. A view from type `S` to type `T` is defined by an implicit value which has function type `S => T`, or by an implicit method convertible to a value of that type.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/xml-processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: XML Processing
disqus: true

tutorial: scala-tour
num: 33
num: 12
---

Scala can be used to easily create, parse, and process XML documents. XML data can be represented in Scala either by using a generic data representation, or with a data-specific data representation. The latter approach is supported by the *data-binding* tool `schema2src`.
Expand Down
0