Skip to content

Commit 4b44bf8

Browse files
committed
corrected what I found while reading
1 parent 75228db commit 4b44bf8

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

contribute.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ For one to contribute a document, one must simply fork the [repo](https://github
5050

5151
## An h2 Header in Markdown
5252

53-
And a paragraph, with a [link](http://www.scala-lang.org.
53+
And a paragraph, with a [link](http://www.scala-lang.org).
5454

5555
One can contribute code by indenting it 4 spaces, or in-line by putting backticks around it like so, `def foo`
5656

es/tutorials/tour/abstract-types.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Traits o [clases](classes.html) con miembros de tipos abstractos son generalment
3434
type U = Int
3535
}
3636

37-
object AbstractTypeTest1 extends Application {
37+
object AbstractTypeTest1 extends App {
3838
def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =
3939
new IntSeqBuffer {
4040
type T = List[U]
@@ -45,7 +45,7 @@ Traits o [clases](classes.html) con miembros de tipos abstractos son generalment
4545
println("content = " + buf.element)
4646
}
4747

48-
El tipo retornado por el método `newIntSeqBuf` está ligado a la especialización del trait `Buffer` en el cual el tipo `U` es ahora equivalente a `Int`. Existe un tipo alias similar en la instancia de la clase anónima dentro del cuerpo del método `newIntSeqBuf`. En ese lugar se crea una nueva instancia de `IntSeqBuffer` en la cual el tipo `T` está ligado a List[Int].
48+
El tipo retornado por el método `newIntSeqBuf` está ligado a la especialización del trait `Buffer` en el cual el tipo `U` es ahora equivalente a `Int`. Existe un tipo alias similar en la instancia de la clase anónima dentro del cuerpo del método `newIntSeqBuf`. En ese lugar se crea una nueva instancia de `IntSeqBuffer` en la cual el tipo `T` está ligado a `List[Int]`.
4949

5050
Es necesario notar que generalmente es posible transformar un tipo abstracto en un tipo paramétrico de una clase y viceversa. A continuación se muestra una versión del código anterior el cual solo usa tipos paramétricos.
5151

@@ -55,7 +55,7 @@ Es necesario notar que generalmente es posible transformar un tipo abstracto en
5555
abstract class SeqBuffer[U, +T <: Seq[U]] extends Buffer[T] {
5656
def length = element.length
5757
}
58-
object AbstractTypeTest2 extends Application {
58+
object AbstractTypeTest2 extends App {
5959
def newIntSeqBuf(e1: Int, e2: Int): SeqBuffer[Int, Seq[Int]] =
6060
new SeqBuffer[Int, List[Int]] {
6161
val element = List(e1, e2)

es/tutorials/tour/annotations.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ El significado de las anotaciones _depende de la implementación_. En la platafo
3030
| [`scala.transient`](http://www.scala-lang.org/api/2.9.1/scala/transient.html) | [`transient`](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html) (palabra clave) |
3131
| [`scala.unchecked`](http://www.scala-lang.org/api/2.9.1/scala/unchecked.html) (desde 2.4.0) | sin equivalente |
3232
| [`scala.volatile`](http://www.scala-lang.org/api/2.9.1/scala/volatile.html) | [`volatile`](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html) (palabra clave) |
33-
| [`scala.reflect.BeanProperty`](http://www.scala-lang.org/api/2.9.1/scala/reflect/BeanProperty.html) | [`Design pattern`](http://java.sun.com/docs/books/tutorial/javabeans/properties/properties.html) |
33+
| [`scala.reflect.BeanProperty`](http://www.scala-lang.org/api/2.9.1/scala/reflect/BeanProperty.html) | [`Design pattern`](http://http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html) |
3434

3535
En el siguiente ejemplo agregamos la anotación `throws` a la definición del método `read` de manera de capturar la excepción lanzada en el programa principal de Java.
3636

37-
> El compilador de Java comprueba que un programa contenga manejadores para [excepciones comprobadas](http://java.sun.com/docs/books/jls/third_edition/html/exceptions.html) al analizar cuales de esas excepciones comprobadas pueden llegar a lanzarse en la ejecución de un método o un constructor. Por cada excepción comprobada que sea un posible resultado, la cláusula **throws** debe para ese método o constructor debe ser mencionada en la clase de esa excepción o una de las superclases.
37+
> El compilador de Java comprueba que un programa contenga manejadores para [excepciones comprobadas](http://docs.oracle.com/javase/specs/jls/se5.0/html/exceptions.html) al analizar cuales de esas excepciones comprobadas pueden llegar a lanzarse en la ejecución de un método o un constructor. Por cada excepción comprobada que sea un posible resultado, la cláusula **throws** debe para ese método o constructor debe ser mencionada en la clase de esa excepción o una de las superclases.
3838
> Ya que Scala no tiene excepciones comprobadas, los métodos en Scala deben ser anotados con una o más anotaciones `throws` para que el código Java pueda capturar las excepciones lanzadas por un método de Scala.
3939
4040
package examples
@@ -57,7 +57,7 @@ El siguiente programa de Java imprime en consola los contenidos del archivo cuyo
5757
while ((c = in.read()) != -1) {
5858
System.out.print((char) c);
5959
}
60-
} catch (java.io.Exception e) {
60+
} catch (java.io.IOException e) {
6161
System.out.println(e.getMessage());
6262
}
6363
}

es/tutorials/tour/currying.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Métodos pueden definir múltiples listas de parámetros. Cuando un método es i
1515

1616
Aquí se muestra un ejemplo:
1717

18-
object CurryTest extends Application {
18+
object CurryTest extends App {
1919

2020
def filter(xs: List[Int], p: Int => Boolean): List[Int] =
2121
if (xs.isEmpty) xs

tutorials/tour/abstract-types.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Traits or [classes](classes.html) with abstract type members are often used in c
3434
type U = Int
3535
}
3636

37-
object AbstractTypeTest1 extends Application {
37+
object AbstractTypeTest1 extends App {
3838
def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =
3939
new IntSeqBuffer {
4040
type T = List[U]
@@ -45,7 +45,7 @@ Traits or [classes](classes.html) with abstract type members are often used in c
4545
println("content = " + buf.element)
4646
}
4747

48-
The return type of method `newIntSeqBuf` refers to a specialization of trait `Buffer` in which type `U` is now equivalent to `Int`. We have a similar type alias in the anonymous class instantiation within the body of method `newIntSeqBuf`. Here we create a new instance of `IntSeqBuffer` in which type `T` refers to List[Int].
48+
The return type of method `newIntSeqBuf` refers to a specialization of trait `Buffer` in which type `U` is now equivalent to `Int`. We have a similar type alias in the anonymous class instantiation within the body of method `newIntSeqBuf`. Here we create a new instance of `IntSeqBuffer` in which type `T` refers to `List[Int]`.
4949

5050
Please note that it is often possible to turn abstract type members into type parameters of classes and vice versa. Here is a version of the code above which only uses type parameters:
5151

@@ -55,7 +55,7 @@ Please note that it is often possible to turn abstract type members into type pa
5555
abstract class SeqBuffer[U, +T <: Seq[U]] extends Buffer[T] {
5656
def length = element.length
5757
}
58-
object AbstractTypeTest2 extends Application {
58+
object AbstractTypeTest2 extends App {
5959
def newIntSeqBuf(e1: Int, e2: Int): SeqBuffer[Int, Seq[Int]] =
6060
new SeqBuffer[Int, List[Int]] {
6161
val element = List(e1, e2)

tutorials/tour/annotations.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ The meaning of annotation clauses is _implementation-dependent_. On the Java pla
2929
| [`scala.transient`](http://www.scala-lang.org/api/2.9.1/scala/transient.html) | [`transient`](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html) (keyword) |
3030
| [`scala.unchecked`](http://www.scala-lang.org/api/2.9.1/scala/unchecked.html) (since 2.4.0) | no equivalent |
3131
| [`scala.volatile`](http://www.scala-lang.org/api/2.9.1/scala/volatile.html) | [`volatile`](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html) (keyword) |
32-
| [`scala.reflect.BeanProperty`](http://www.scala-lang.org/api/2.9.1/scala/reflect/BeanProperty.html) | [`Design pattern`](http://java.sun.com/docs/books/tutorial/javabeans/properties/properties.html) |
32+
| [`scala.reflect.BeanProperty`](http://www.scala-lang.org/api/2.9.1/scala/reflect/BeanProperty.html) | [`Design pattern`](http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html) |
3333

3434
In the following example we add the `throws` annotation to the definition of the method `read` in order to catch the thrown exception in the Java main program.
3535

36-
> A Java compiler checks that a program contains handlers for [checked exceptions](http://java.sun.com/docs/books/jls/third_edition/html/exceptions.html) by analyzing which checked exceptions can result from execution of a method or constructor. For each checked exception which is a possible result, the **throws** clause for the method or constructor _must_ mention the class of that exception or one of the superclasses of the class of that exception.
36+
> A Java compiler checks that a program contains handlers for [checked exceptions](http://docs.oracle.com/javase/specs/jls/se5.0/html/exceptions.html) by analyzing which checked exceptions can result from execution of a method or constructor. For each checked exception which is a possible result, the **throws** clause for the method or constructor _must_ mention the class of that exception or one of the superclasses of the class of that exception.
3737
> Since Scala has no checked exceptions, Scala methods _must_ be annotated with one or more `throws` annotations such that Java code can catch exceptions thrown by a Scala method.
3838
3939
package examples
@@ -56,7 +56,7 @@ The following Java program prints out the contents of the file whose name is pas
5656
while ((c = in.read()) != -1) {
5757
System.out.print((char) c);
5858
}
59-
} catch (java.io.Exception e) {
59+
} catch (java.io.IOException e) {
6060
System.out.println(e.getMessage());
6161
}
6262
}

tutorials/tour/currying.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Methods may define multiple parameter lists. When a method is called with a fewe
1212

1313
Here is an example:
1414

15-
object CurryTest extends Application {
15+
object CurryTest extends App {
1616

1717
def filter(xs: List[Int], p: Int => Boolean): List[Int] =
1818
if (xs.isEmpty) xs

0 commit comments

Comments
 (0)