Skip to content

Commit 270cf31

Browse files
authored
Better overview
1 parent e3f0037 commit 270cf31

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

docs/src/index.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,23 @@ also possible to iterate over a `StreamSample` like so
5050
```julia
5151
julia> using StreamSampling
5252

53-
julia> iter = 1:100
53+
julia> iter = 1:100;
5454

5555
julia> ss = StreamSample{Int}(iter, 5, 100);
5656

57-
julia> collect(ss)
57+
julia> r = Int[];
58+
59+
julia> for x in ss
60+
push!(r, x)
61+
end
62+
63+
julia> r
5864
5-element Vector{Int64}:
59-
7
60-
9
61-
20
62-
49
63-
74
65+
10
66+
22
67+
26
68+
35
69+
75
6470
```
6571

6672
Consult the [API page](https://juliadynamics.github.io/StreamSampling.jl/stable/api) for more information about the package interface.

0 commit comments

Comments
 (0)