Skip to content

Commit 868fb1f

Browse files
authored
Fix typos/grammar in Generators section
1 parent 9f800b0 commit 868fb1f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/scala/scalachecklib/GeneratorsSection.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.scalatest.prop.Checkers
1111
*
1212
* A generator can be seen simply as a function that takes some generation parameters, and (maybe) returns a
1313
* generated value. That is, the type `Gen[T]` may be thought of as a function of type `Gen.Params => Option[T]`.
14-
* However, the Gen class contains additional methods to make it possible to map generators, use them in
14+
* However, the `Gen` class contains additional methods to make it possible to map generators, use them in
1515
* for-comprehensions and so on. Conceptually, though, you should think of generators simply as functions, and the
1616
* combinators in the `Gen` object can be used to create or modify the behaviour of such generator functions.
1717
*
@@ -21,7 +21,7 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
2121

2222
import GeneratorsHelper._
2323

24-
/** Lets see how to create a new generator. The best way to do it is to use the generator combinators that exist
24+
/** Let's see how to create a new generator. The best way to do it is to use the generator combinators that exist
2525
* in the `org.scalacheck.Gen` module. These can be combined using a for-comprehension. Suppose you need a generator
2626
* which generates a tuple that contains two random integer values, one of them being at least twice as big as the
2727
* other. The following definition does this:
@@ -44,9 +44,9 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
4444

4545
}
4646

47-
/** You can create generators that picks one value out of a selection of values.
47+
/** You can create generators that pick one value out of a selection of values.
4848
* The `oneOf` method creates a generator that randomly picks one of its parameters each time it generates a value.
49-
* Notice that plain values are implicitly converted to generators (which always generates that value) if needed.
49+
* Notice that plain values are implicitly converted to generators (which always generate that value) if needed.
5050
*
5151
*
5252
* The following generator generates a vowel:
@@ -82,7 +82,7 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
8282
* Now, the vowel generator will generate ''E:s'' more often than ''U:s''. Roughly, 4/14 of the values generated
8383
* will be ''E:s'', and 1/14 of them will be ''U:s''.
8484
*
85-
* Another methods in the `Gen` API:
85+
* Other methods in the `Gen` API:
8686
* {{{
8787
* def alphaChar: Gen[Char]
8888
*
@@ -138,7 +138,7 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
138138

139139
/** ==Case class Generators==
140140
*
141-
* On the basis of the above we can create a generator for the next case class:
141+
* On the basis of the above we can create a generator for the following case class:
142142
*
143143
* {{{
144144
* case class Foo(intValue: Int, charValue: Char)
@@ -164,7 +164,7 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
164164
/** ==Sized Generators==
165165
*
166166
* When ScalaCheck uses a generator to generate a value, it feeds it with some parameters. One of the parameters
167-
* the generator is given, is a size value, which some generators use to generate their values.
167+
* the generator is given is a size value, which some generators use to generate their values.
168168
*
169169
* If you want to use the size parameter in your own generator, you can use the `Gen.sized` method:
170170
*
@@ -173,7 +173,7 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
173173
* }}}
174174
*
175175
* In this example we're creating a generator that produces two lists of numbers where 1/3 are positive and 2/3 are
176-
* negative. ''Note: We're also returning the original size to verify the behaviour''
176+
* negative. ''Note: we're also returning the original size to verify the behaviour.''
177177
*/
178178
def sizedGenerator(res0: Int, res1: Int) = {
179179

@@ -200,7 +200,7 @@ object GeneratorsSection extends Checkers with Matchers with org.scalaexercises.
200200
/** ==Generating Containers==
201201
*
202202
* There is a special generator, `Gen.containerOf`, that generates containers such as lists and arrays.
203-
* They take another generator as argument, that is responsible for generating the individual items.
203+
* It takes another generator as argument which is responsible for generating the individual items.
204204
* You can use it in the following way:
205205
*
206206
* {{{

0 commit comments

Comments
 (0)