Skip to content

Formatting in the Tour / Jekyll under Windows #80

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 1 commit into from
Apr 12, 2012
Merged
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ cd into the `scala.github.com` directory, and build by:

The generated site is available at `http://localhost:4000`

If you get `incompatible encoding` errors when generating the site under Windows, then ensure that the
console in which you are running jekyll can work with UTF-8 characters. As described in the blog
[Solving UTF problem with Jekyll on Windows](http://joseoncode.com/2011/11/27/solving-utf-problem-with-jekyll-on-windows/)
you have to execute `chcp 65001`. This command is best added to the `jekyll.bat`-script.

## Markdown ##

The markdown used in this site uses [Maruku](http://maruku.rubyforge.org/maruku.html) extensions.
Expand Down
2 changes: 1 addition & 1 deletion es/tutorials/tour/case-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Aquí un ejemplo:
Los parámetros constructores de las clases Case son tratados como valores públicos y pueden ser accedidos directamente.

val x = Var("x")
Console.println(x.name)
println(x.name)

Para cada una de las clases Case el compilador de Scala genera el método `equals` el cual implementa la igualdad estructural y un método `toString`. Por ejemplo:

Expand Down
8 changes: 4 additions & 4 deletions tutorials/tour/case-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ num: 5

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).

Here is an example for a class hierarchy which consists of an abstract super class Term and three concrete case classes `Var`, `Fun`, and `App`.
Here is an example for a class hierarchy which consists of an abstract super class `Term` and three concrete case classes `Var`, `Fun`, and `App`.

abstract class Term
case class Var(name: String) extends Term
case class Fun(arg: String, body: Term) extends Term
case class App(f: Term, v: Term) extends Term

This class hierarchy can be used to represent terms of the [untyped lambda calculus](http://www.ezresult.com/article/Lambda_calculus). To facilitate the construction of case class instances, Scala does not require that the new primitive is used. One can simply use the class name as a function.
This class hierarchy can be used to represent terms of the [untyped lambda calculus](http://www.ezresult.com/article/Lambda_calculus). To facilitate the construction of case class instances, Scala does not require that the `new` primitive is used. One can simply use the class name as a function.

Here is an example:

Expand All @@ -26,9 +26,9 @@ Here is an example:
The constructor parameters of case classes are treated as public values and can be accessed directly.

val x = Var("x")
Console.println(x.name)
println(x.name)

For every case class the Scala compiler generates equals method which implements structural equality and a `toString` method. For instance:
For every case class the Scala compiler generates an `equals` method which implements structural equality and a `toString` method. For instance:

val x1 = Var("x")
val x2 = Var("x")
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/currying.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Here is an example:
println(filter(nums, modN(3)))
}

_Note: method `modN` is partially applied in the two `filter` calls; i.e. only its first argument is actually applied. The `termmodN(2)` yields a function of type `Int => Boolean` and is thus a possible candidate for the second argument of function `filter`._
_Note: method `modN` is partially applied in the two `filter` calls; i.e. only its first argument is actually applied. The term `modN(2)` yields a function of type `Int => Boolean` and is thus a possible candidate for the second argument of function `filter`._

Here's the output of the program above:

Expand Down