From 969629ed69ddca4f375ba9bcb9125a110a735b3b Mon Sep 17 00:00:00 2001 From: Vivek Poddar Date: Sun, 19 Jun 2016 11:07:07 +0530 Subject: [PATCH] Fix typo. --- overviews/collections/creating-collections-from-scratch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overviews/collections/creating-collections-from-scratch.md b/overviews/collections/creating-collections-from-scratch.md index d8431f7677..a89fcc70dd 100644 --- a/overviews/collections/creating-collections-from-scratch.md +++ b/overviews/collections/creating-collections-from-scratch.md @@ -24,7 +24,7 @@ You have syntax `List(1, 2, 3)` to create a list of three integers and `Map('A' List.apply(1.0, 2.0) -So this is a call to the `apply` method of the companion object of the `List` class. That method takes an arbitrary number of arguments an constructs a list from them. Every collection class in the Scala library has a companion object with such an `apply` method. It does not matter whether the collection class represents a concrete implementation, like `List`, or `Stream` or `Vector`, do, or whether it is an abstract base class such as `Seq`, `Set` or `Traversable`. In the latter case, calling apply will produce some default implementation of the abstract base class. Examples: +So this is a call to the `apply` method of the companion object of the `List` class. That method takes an arbitrary number of arguments and constructs a list from them. Every collection class in the Scala library has a companion object with such an `apply` method. It does not matter whether the collection class represents a concrete implementation, like `List`, or `Stream` or `Vector`, do, or whether it is an abstract base class such as `Seq`, `Set` or `Traversable`. In the latter case, calling apply will produce some default implementation of the abstract base class. Examples: scala> List(1, 2, 3) res17: List[Int] = List(1, 2, 3) @@ -55,4 +55,4 @@ Descendants of `Seq` classes provide also other factory operations in their comp | `S.tabulate(m, n){f}` | A sequence of sequences of dimension `m×n` where the element at each index `(i, j)` is computed by `f(i, j)`. (exists also in higher dimensions). | | `S.range(start, end)` | The sequence of integers `start` ... `end-1`. | | `S.range(start, end, step)`| The sequence of integers starting with `start` and progressing by `step` increments up to, and excluding, the `end` value. | -| `S.iterate(x, n)(f)` | The sequence of length `n` with elements `x`, `f(x)`, `f(f(x))`, ... | \ No newline at end of file +| `S.iterate(x, n)(f)` | The sequence of length `n` with elements `x`, `f(x)`, `f(f(x))`, ... |