@@ -140,29 +140,28 @@ Creates the hash C<< { odd => [1, 3], even => [2, 4] } >> in C<%h>.
140
140
multi method Bool(List:D:) returns Bool:D
141
141
142
142
Returns C < True > if the list has at least one element, and C < False >
143
- for the empty list
143
+ for the empty list.
144
144
145
145
= head3 Str
146
146
147
147
multi method Str(List:D:) returns Str:D
148
148
149
- Same as C < .join(' ') > .
149
+ Stringifies the elements of the list and joins them with spaces
150
+ (same as C < .join(' ') > ).
150
151
151
152
= head3 Int
152
153
153
154
multi method Int(List:D:) return Int:D
154
155
155
- Same as C < .elems > .
156
+ Returns the number of elements in the list (same as C < .elems > ) .
156
157
157
158
= head3 pick
158
159
159
160
multi method pick(List:D:, $count = 1)
160
161
161
- Returns a list of random, non-repeating list elements of C < $count >
162
- elements (or a single element if C < $count > is 1).
163
-
164
- If a C < * > is passed to C < $count > , all elements are returned in a random
165
- order.
162
+ Returns C < $count > elements chosen at random and without repetition
163
+ from the invocant. If C < * > is passed as C < $count > , all elements
164
+ from the invocant list are returned in a random sequence.
166
165
167
166
= head3 roll
168
167
@@ -179,8 +178,9 @@ elements from the original list.
179
178
180
179
multi method eager(List:D:) returns List:D
181
180
182
- Evaluates all elements in the list, ie make the list not be lazy.
183
- Returns the invocant.
181
+ Evaluates all elements in the list eagerly, and returns the invocant.
182
+ If a List signals that it is "known infinite", eager evaluation may
183
+ stop at the point where the infinity is detected.
184
184
185
185
= head3 reverse
186
186
0 commit comments