Skip to content

Fix typos #1506

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
Aug 21, 2019
Merged
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
4 changes: 2 additions & 2 deletions _ja/tutorials/scala-for-java-programmers.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Scala は、それら2つの中間のような**ケースクラス**という概

{ case "x" => 5 }

この記法は、引数として文字列 `"x"` を受けとったら整数 `5` を返し、それ以外のときは例外とともに失敗する関数を定義ます
この記法は、引数として文字列 `"x"` を受けとったら整数 `5` を返し、それ以外のときは例外とともに失敗する関数を定義します

評価関数を書く前に、環境の型に名前を付けましょう。
もちろん環境には型 `String => Int` をいつでも使えますが、この型に名前を付けておけばプログラムが単純になり、将来変更しやすくなります。
Expand Down Expand Up @@ -379,7 +379,7 @@ Scala は普通のクラスと同様にケースクラスにメソッド定義
この関数はパターンマッチに関連して2つの新しい概念を紹介しています。
はじめに、変数への `case` 式が、`if` キーワードに続く式、**ガード**を持っています。
このガードは、その式が真でない限りパターンマッチが成功するのを防ぎます。
ここでのガードの使用は、微分される変数の名前が微分の変数 `v` と同じときにだけ、定数`1` を返すことを保証するためで
ここでのガードの使用は、微分される変数の名前が微分の変数 `v` と同じときにだけ、定数`1` を返すことを保証するためです
ここで使われているパターンマッチの新しい特徴2つ目は、`_` で書かれている**ワイルドカード**です。
それはどんな値にもマッチして、名前をつけないパターンです。

Expand Down