Skip to content

fixes a typo in the collections page #724

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
Mar 7, 2017
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ language: ja
Iterator(1, 2, 3) // 3つの整数を返すイテレータ
Set(dog, cat, bird) // 3種類の動物の集合
HashSet(dog, cat, bird) // 同じ動物のハッシュ集合
Map(a -> 7, 'b' -> 0) // 文字から整数へのマップ
Map('a' -> 7, 'b' -> 0) // 文字から整数へのマップ

上の全ての行での呼び出しは内部では何らかのオブジェクトの `apply` メソッドを呼び出している。例えば、3行目は以下のように展開する:

Expand Down
2 changes: 1 addition & 1 deletion overviews/collections/creating-collections-from-scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You have syntax `List(1, 2, 3)` to create a list of three integers and `Map('A'
Iterator(1, 2, 3) // An iterator returning three integers.
Set(dog, cat, bird) // A set of three animals
HashSet(dog, cat, bird) // A hash set of the same animals
Map(a -> 7, 'b' -> 0) // A map from characters to integers
Map('a' -> 7, 'b' -> 0) // A map from characters to integers

"Under the covers" each of the above lines is a call to the `apply` method of some object. For instance, the third line above expands to

Expand Down