diff --git a/ja/overviews/collections/creating-collections-from-scratch.md b/ja/overviews/collections/creating-collections-from-scratch.md index 0fae788631..58db4a2f5b 100644 --- a/ja/overviews/collections/creating-collections-from-scratch.md +++ b/ja/overviews/collections/creating-collections-from-scratch.md @@ -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行目は以下のように展開する: diff --git a/overviews/collections/creating-collections-from-scratch.md b/overviews/collections/creating-collections-from-scratch.md index a89fcc70dd..0bba616794 100644 --- a/overviews/collections/creating-collections-from-scratch.md +++ b/overviews/collections/creating-collections-from-scratch.md @@ -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