Skip to content

Commit 4cfb847

Browse files
committed
A few documentation improvements.
1 parent 9356804 commit 4cfb847

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/List.pod

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,29 +140,28 @@ Creates the hash C<< { odd => [1, 3], even => [2, 4] } >> in C<%h>.
140140
multi method Bool(List:D:) returns Bool:D
141141
142142
Returns C<True> if the list has at least one element, and C<False>
143-
for the empty list
143+
for the empty list.
144144
145145
=head3 Str
146146
147147
multi method Str(List:D:) returns Str:D
148148
149-
Same as C<.join(' ')>.
149+
Stringifies the elements of the list and joins them with spaces
150+
(same as C<.join(' ')>).
150151
151152
=head3 Int
152153
153154
multi method Int(List:D:) return Int:D
154155
155-
Same as C<.elems>.
156+
Returns the number of elements in the list (same as C<.elems>).
156157
157158
=head3 pick
158159
159160
multi method pick(List:D:, $count = 1)
160161
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.
166165
167166
=head3 roll
168167
@@ -179,8 +178,9 @@ elements from the original list.
179178
180179
multi method eager(List:D:) returns List:D
181180
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.
184184
185185
=head3 reverse
186186

0 commit comments

Comments
 (0)