Skip to content

Commit 832eac7

Browse files
committed
Reflow and fixing definitions, refs #1731
1 parent e390f35 commit 832eac7

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

doc/Type/Any.pod6

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ fact that L<map|/routine/map> flattens out L<slips|/type/Slip> while C<nodemap>
247247
248248
Defined as:
249249
250-
method flat(--> Seq:D) is nodal
250+
method flat() is nodal
251251
252252
Interprets the invocant as a list, flattens
253-
L<non-containerized|/language/containers> L<Iterable|/type/Iterable>s
254-
into a flat list, and returns that list. Keep in mind L<Map|/type/Map> and
255-
L<Hash|/type/Hash> types are L<Iterable|/type/Iterable> and so will be flattened into lists
256-
of pairs.
253+
L<non-containerized|/language/containers> L<Iterable|/type/Iterable>s into a
254+
flat list, and returns that list. Keep in mind L<Map|/type/Map> and
255+
L<Hash|/type/Hash> types are L<Iterable|/type/Iterable> and so will be flattened
256+
into lists of pairs.
257257
258258
say ((1, 2), (3), %(:42a)); # OUTPUT: «((1 2) 3 {a => 42})␤»
259259
say ((1, 2), (3), %(:42a)).flat; # OUTPUT: «(1 2 3 a => 42)␤»
@@ -275,10 +275,10 @@ L<signature destructuring|/type/Signature#Destructuring_Parameters>
275275
276276
Defined as:
277277
278-
method eager(--> Seq:D) is nodal
278+
method eager() is nodal
279279
280-
Interprets the invocant as a L<List|/type/List>, evaluates it eagerly, and returns that
281-
L<List|/type/List>.
280+
Interprets the invocant as a L<List|/type/List>, evaluates it eagerly, and
281+
returns that L<List|/type/List>.
282282
283283
my $range = 1..5;
284284
say $range; # OUTPUT: «1..5␤»
@@ -288,17 +288,24 @@ L<List|/type/List>.
288288
289289
Defined as:
290290
291-
method elems(--> Int:D) is nodal
291+
proto method elems(|) is nodal
292+
multi method elems(Any:U: --> 1)
293+
multi method elems(Any:D:)
292294
293295
Interprets the invocant as a list, and returns the number of elements in the
294296
list.
295297
296298
say 42.elems; # OUTPUT: «1␤»
297299
say <a b c>.elems; # OUTPUT: «3␤»
300+
say Whatever.elems ; # OUTPUT: «1␤»
301+
302+
It will also return 1 for classes.
298303
299304
=head2 method end
300305
301-
method end(--> Any:D) is nodal
306+
proto method end(|) is nodal
307+
multi method end(Any:U: --> 0)
308+
multi method end(Any:D:)
302309
303310
Interprets the invocant as a list, and returns the last index of that list.
304311
@@ -363,7 +370,7 @@ Coerces the invocant to L<List|/type/List>, using the L<list|/routine/list> meth
363370
Defined as
364371
365372
proto method serial(|) is nodal
366-
multi method serial( --> Any)
373+
multi method serial()
367374
368375
Returns the self-reference to the instance itself:
369376
@@ -808,7 +815,7 @@ L<C<List.squish>|/type/List#routine_squish> for additional examples.
808815
809816
Defined as:
810817
811-
method permutations(--> Seq)
818+
method permutations(|c)
812819
813820
Coerces the invocant to a C<list> by applying its
814821
L«C<.list>|/routine/list» method and uses
@@ -1143,7 +1150,7 @@ Returns an empty List.
11431150
11441151
Defined as:
11451152
1146-
method combinations(--> Seq)
1153+
method combinations(|c)
11471154
11481155
Coerces the invocant to a C<list> by applying its L«C<.list>|/routine/list»
11491156
method and uses L«C<List.combinations>|/type/List#routine_combinations» on it.
@@ -1246,8 +1253,8 @@ the method C<list> on the instance.
12461253
12471254
Defined as:
12481255
1249-
multi method batch(Int:D $batch --> Seq)
1250-
multi method batch(Int:D :$elems --> Seq)
1256+
multi method batch(Int:D $batch)
1257+
multi method batch(Int:D :$elems!)
12511258
12521259
Coerces the invocant to a C<list> by applying
12531260
its L«C<.list>|/routine/list» method and uses

0 commit comments

Comments
 (0)