@@ -76,7 +76,7 @@ defmodule Stream do
76
76
There are many functions in Elixir's standard library that return
77
77
streams, some examples are:
78
78
79
- * `IO.stream/1 ` - Streams input lines, one by one;
79
+ * `IO.stream/2 ` - Streams input lines, one by one;
80
80
* `URI.query_decoder/1` - Decodes a query string, pair by pair;
81
81
82
82
This module also provides many convenience functions for creating streams,
@@ -209,7 +209,7 @@ defmodule Stream do
209
209
from `pad` if it was passed. If `pad` is passed and does not
210
210
have enough elements to fill the chunk, then the chunk is
211
211
returned anyway with less than `n` elements. If `pad` is not
212
- passed at all or is nil, then the partial chunk is discarded
212
+ passed at all or is ` nil` , then the partial chunk is discarded
213
213
from the result.
214
214
215
215
## Examples
@@ -245,7 +245,7 @@ defmodule Stream do
245
245
@ doc """
246
246
Chunks the `enum` by buffering elements for which `fun` returns
247
247
the same value and only emit them when `fun` returns a new value
248
- or the `enum` finishes,
248
+ or the `enum` finishes.
249
249
250
250
## Examples
251
251
@@ -319,7 +319,7 @@ defmodule Stream do
319
319
320
320
@ doc """
321
321
Lazily drops elements of the enumerable while the given
322
- function returns true.
322
+ function returns ` true` .
323
323
324
324
## Examples
325
325
@@ -377,10 +377,10 @@ defmodule Stream do
377
377
end
378
378
379
379
@ doc """
380
- Creates a stream that filters and then map elements according
381
- to given funtions .
380
+ Creates a stream that filters and then maps elements according
381
+ to given functions .
382
382
383
- It exists for simmetry with Enum.filter_map/3.
383
+ Exists for symmetry with ` Enum.filter_map/3` .
384
384
385
385
## Examples
386
386
@@ -412,7 +412,7 @@ defmodule Stream do
412
412
413
413
@ doc """
414
414
Creates a stream that applies the given function to each
415
- element, emits the result and uses the same result as accumulator
415
+ element, emits the result and uses the same result as the accumulator
416
416
for the next computation.
417
417
418
418
## Examples
@@ -429,8 +429,8 @@ defmodule Stream do
429
429
430
430
@ doc """
431
431
Creates a stream that applies the given function to each
432
- element, emits the result and uses the same result as accumulator
433
- for the next computation. Uses the given `acc` as starting value.
432
+ element, emits the result and uses the same result as the accumulator
433
+ for the next computation. Uses the given `acc` as the starting value.
434
434
435
435
## Examples
436
436
@@ -527,7 +527,7 @@ defmodule Stream do
527
527
528
528
## Examples
529
529
530
- Open up a file, replace all # by % and stream to another file
530
+ Open up a file, replace all `#` by `%` and stream to another file
531
531
without loading the whole file in memory:
532
532
533
533
stream = File.stream!("code")
@@ -551,7 +551,7 @@ defmodule Stream do
551
551
For such, the collection is fully enumerated keeping up to `2 * n`
552
552
elements in memory. Once the end of the collection is reached,
553
553
the last `count` elements will be executed. Therefore, using
554
- a negative `n` in an infinite collection will never return.
554
+ a negative `n` on an infinite collection will never return.
555
555
556
556
## Examples
557
557
@@ -607,7 +607,7 @@ defmodule Stream do
607
607
@ doc """
608
608
Creates a stream that takes every `n` item from the enumerable.
609
609
610
- The first item is always included, unless n is 0.
610
+ The first item is always included, unless `n` is 0.
611
611
612
612
## Examples
613
613
@@ -625,7 +625,7 @@ defmodule Stream do
625
625
626
626
@ doc """
627
627
Lazily takes elements of the enumerable while the given
628
- function returns true.
628
+ function returns ` true` .
629
629
630
630
## Examples
631
631
@@ -640,10 +640,10 @@ defmodule Stream do
640
640
end
641
641
642
642
@ doc """
643
- Creates a stream that only emits elements if they are uniq .
643
+ Creates a stream that only emits elements if they are unique .
644
644
645
645
Keep in mind that, in order to know if an element is unique
646
- or not, this function needs to store all uniq values emitted
646
+ or not, this function needs to store all unique values emitted
647
647
by the stream. Therefore, if the stream is infinite, the number
648
648
of items stored will grow infinitely, never being garbage collected.
649
649
@@ -664,7 +664,7 @@ defmodule Stream do
664
664
665
665
@ doc """
666
666
Creates a stream where each item in the enumerable will
667
- be accompanied by its index.
667
+ be wrapped in a tuple alongside its index.
668
668
669
669
## Examples
670
670
@@ -885,7 +885,7 @@ defmodule Stream do
885
885
Successive values are generated by calling `next_fun` with the
886
886
previous accumulator (the initial value being the result returned
887
887
by `start_fun`) and it must return a tuple with the current and
888
- next accumulator. The enumeration finishes if it returns nil.
888
+ next accumulator. The enumeration finishes if it returns ` nil` .
889
889
890
890
As the name says, this function is useful to stream values from
891
891
resources.
@@ -940,7 +940,7 @@ defmodule Stream do
940
940
941
941
Successive values are generated by calling `next_fun` with the previous
942
942
accumulator and it must return a tuple with the current and next
943
- accumulator. The enumeration finishes if it returns nil.
943
+ accumulator. The enumeration finishes if it returns ` nil` .
944
944
945
945
## Examples
946
946
0 commit comments