@@ -76,18 +76,19 @@ Creates a new C<Seq> object from the iterator passed as the single argument.
76
76
77
77
method iterator(Seq:D: --> Iterator:D)
78
78
79
- Returns the underlying iterator, and marks the invocant as consumed.
80
- If called on an already consumed sequence, throws an error of type
81
- L < X::Seq::Consumed|/type/X::Seq::Consumed > .
79
+ If the C < Seq > is not cached, returns the underlying iterator and marks
80
+ the invocant as consumed. If called on an already consumed sequence,
81
+ throws an error of type L < X::Seq::Consumed|/type/X::Seq::Consumed > .
82
+
83
+ Otherwise returns an iterator over the cached list.
82
84
83
85
= head2 method is-lazy
84
86
85
87
method is-lazy(Seq:D: --> Bool:D)
86
88
87
- Returns C < True > if and only if the underlying iterator guarantees lazy
88
- evaluation and has not been completely evaluated. If called on an
89
- already consumed sequence, throws an error of type
90
- L < X::Seq::Consumed|/type/X::Seq::Consumed > .
89
+ Returns C < True > if and only if the underlying iterator or cached list
90
+ considers itself lazy. If called on an already consumed sequence, throws
91
+ an error of type L < X::Seq::Consumed|/type/X::Seq::Consumed > .
91
92
92
93
= head2 method elems
93
94
@@ -98,7 +99,7 @@ predicted, the C<Seq> is cached and evaluated till the end.
98
99
99
100
Because an infinite sequence cannot be evaluated till the end, such a
100
101
sequence I < should > be declared lazy. Calling C < .elems > on a lazy C < Seq >
101
- throws an error of type L < X::Cannot::Lazy|/type/X::Cannot::Lazy > .
102
+ L < fails|/routine/fail > with L < X::Cannot::Lazy|/type/X::Cannot::Lazy > .
102
103
103
104
= head2 method eager
104
105
0 commit comments