@@ -37,13 +37,13 @@ defprotocol Enumerable do
3737 def reduce ( collection , acc , fun )
3838
3939 @ doc """
40- The function is used to check if a value exists within the collection.
40+ This function is used to check if a value exists within the collection.
4141 Membership should be tested with the match (`===`) operator.
4242 """
4343 def member? ( collection , value )
4444
4545 @ doc """
46- The function is used to retrieve the collection's size.
46+ This function is used to retrieve the collection's size.
4747 """
4848 def count ( collection )
4949end
@@ -67,12 +67,12 @@ defmodule Enum do
6767
6868 Note the functions in the `Enum` module are eager: they always start
6969 the enumeration of the given collection. The `Stream` module allows
70- lazy enumeration of collections and also provides infinite streams.
70+ lazy enumeration of collections and provides infinite streams.
7171
7272 Since the majority of the functions in `Enum` enumerate the whole
7373 collection and return a list as result, infinite streams need to
7474 be carefully used with such functions, as they can potentially run
75- forever, for example:
75+ forever. For example:
7676
7777 Enum.each Stream.cycle([1,2,3]), &IO.puts(&1)
7878
@@ -88,7 +88,7 @@ defmodule Enum do
8888 @ doc """
8989 Checks if `value` exists within the `collection`.
9090
91- Membership is tested with the match (`===`) operator although
91+ Membership is tested with the match (`===`) operator, although
9292 enumerables like ranges may include floats inside the given
9393 range.
9494
@@ -256,7 +256,7 @@ defmodule Enum do
256256 @ doc """
257257 Concatenates the enumerable on the right with the enumerable on the left.
258258
259- This function produces the same result the `++` operator for lists.
259+ This function produces the same result as the `++` operator for lists.
260260
261261 ## Examples
262262
@@ -285,7 +285,7 @@ defmodule Enum do
285285 @ doc """
286286 Drops the first `count` items from `collection`.
287287
288- If a negative value `count` is given the last `count`
288+ If a negative value `count` is given, the last `count`
289289 values will be dropped. The collection is enumerated
290290 once to retrieve the proper index and the remaining
291291 calculation is performed from the end.
@@ -906,7 +906,7 @@ defmodule Enum do
906906 Notice you need to explicitly call `:random.seed/1` and
907907 set a seed value for the random algorithm. Otherwise, the
908908 default seed will be set which will always return the same
909- result. For example, one could the following to set a seed
909+ result. For example, one could do the following to set a seed
910910 dynamically:
911911
912912 :random.seed(:erlang.now)
@@ -973,7 +973,7 @@ defmodule Enum do
973973 collection.
974974
975975 Be aware that a negative `count` implies the collection
976- will be enumerated twice. Once to calculate the position and
976+ will be enumerated twice: once to calculate the position, and
977977 a second time to do the actual splitting.
978978
979979 ## Examples
@@ -1039,9 +1039,9 @@ defmodule Enum do
10391039 @ doc """
10401040 Takes the first `count` items from the collection.
10411041
1042- If a negative value `count` is given the last `count`
1042+ If a negative value `count` is given, the last `count`
10431043 values will be taken. The collection is enumerated
1044- once to retrieve the proper index and the remaining
1044+ once to retrieve the proper index. The remaining
10451045 calculation is performed from the end.
10461046
10471047 ## Examples
@@ -1155,7 +1155,7 @@ defmodule Enum do
11551155 end
11561156
11571157 @ doc """
1158- Iterates the enumerable removing all duplicated items.
1158+ Iterates the enumerable, removing all duplicated items.
11591159
11601160 ## Examples
11611161
@@ -1330,7 +1330,7 @@ defmodule Enum do
13301330
13311331 @ doc """
13321332 Returns the collection with each element wrapped in a tuple
1333- along side its index.
1333+ alongside its index.
13341334
13351335 ## Examples
13361336
@@ -1354,7 +1354,7 @@ defmodule Enum do
13541354 @ doc """
13551355 Returns a collection of lists containing `n` items each, where
13561356 each new chunk starts `step` elements into the collection.
1357- `step` is optional and if not passed, defaults to `n`, i.e.
1357+ `step` is optional and, if not passed, defaults to `n`, i.e.
13581358 chunks do not overlap. If the final chunk does not have `n`
13591359 elements to fill the chunk, elements are taken as necessary
13601360 from `pad` if it was passed. If `pad` is passed and does not
@@ -1425,8 +1425,8 @@ defmodule Enum do
14251425 end
14261426
14271427 @ doc """
1428- Returns a subset list of the given collection. Dropping elements
1429- until element position `start`, then taking `count` elements.
1428+ Returns a subset list of the given collection. Drops elements
1429+ until element position `start`, then takes `count` elements.
14301430
14311431 ## Examples
14321432
@@ -1470,8 +1470,8 @@ defmodule Enum do
14701470 end
14711471
14721472 @ doc """
1473- Returns a subset list of the given collection. Dropping elements
1474- until element position `range.first`, then taking elements until element
1473+ Returns a subset list of the given collection. Drops elements
1474+ until element position `range.first`, then takes elements until element
14751475 position `range.last` (inclusive).
14761476
14771477 Positions are calculated by adding the number of items in the collection to
0 commit comments