Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reflow and fixing definitions, refs #1731
  • Loading branch information
JJ committed Feb 19, 2019
1 parent e390f35 commit 832eac7
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions doc/Type/Any.pod6
Expand Up @@ -247,13 +247,13 @@ fact that L<map|/routine/map> flattens out L<slips|/type/Slip> while C<nodemap>
Defined as:
method flat(--> Seq:D) is nodal
method flat() is nodal
Interprets the invocant as a list, flattens
L<non-containerized|/language/containers> L<Iterable|/type/Iterable>s
into a flat list, and returns that list. Keep in mind L<Map|/type/Map> and
L<Hash|/type/Hash> types are L<Iterable|/type/Iterable> and so will be flattened into lists
of pairs.
L<non-containerized|/language/containers> L<Iterable|/type/Iterable>s into a
flat list, and returns that list. Keep in mind L<Map|/type/Map> and
L<Hash|/type/Hash> types are L<Iterable|/type/Iterable> and so will be flattened
into lists of pairs.
say ((1, 2), (3), %(:42a)); # OUTPUT: «((1 2) 3 {a => 42})␤»
say ((1, 2), (3), %(:42a)).flat; # OUTPUT: «(1 2 3 a => 42)␤»
Expand All @@ -275,10 +275,10 @@ L<signature destructuring|/type/Signature#Destructuring_Parameters>
Defined as:
method eager(--> Seq:D) is nodal
method eager() is nodal
Interprets the invocant as a L<List|/type/List>, evaluates it eagerly, and returns that
L<List|/type/List>.
Interprets the invocant as a L<List|/type/List>, evaluates it eagerly, and
returns that L<List|/type/List>.
my $range = 1..5;
say $range; # OUTPUT: «1..5␤»
Expand All @@ -288,17 +288,24 @@ L<List|/type/List>.
Defined as:
method elems(--> Int:D) is nodal
proto method elems(|) is nodal
multi method elems(Any:U: --> 1)
multi method elems(Any:D:)
Interprets the invocant as a list, and returns the number of elements in the
list.
say 42.elems; # OUTPUT: «1␤»
say <a b c>.elems; # OUTPUT: «3␤»
say Whatever.elems ; # OUTPUT: «1␤»
It will also return 1 for classes.
=head2 method end
method end(--> Any:D) is nodal
proto method end(|) is nodal
multi method end(Any:U: --> 0)
multi method end(Any:D:)
Interprets the invocant as a list, and returns the last index of that list.
Expand Down Expand Up @@ -363,7 +370,7 @@ Coerces the invocant to L<List|/type/List>, using the L<list|/routine/list> meth
Defined as
proto method serial(|) is nodal
multi method serial( --> Any)
multi method serial()
Returns the self-reference to the instance itself:
Expand Down Expand Up @@ -808,7 +815,7 @@ L<C<List.squish>|/type/List#routine_squish> for additional examples.
Defined as:
method permutations(--> Seq)
method permutations(|c)
Coerces the invocant to a C<list> by applying its
L«C<.list>|/routine/list» method and uses
Expand Down Expand Up @@ -1143,7 +1150,7 @@ Returns an empty List.
Defined as:
method combinations(--> Seq)
method combinations(|c)
Coerces the invocant to a C<list> by applying its L«C<.list>|/routine/list»
method and uses L«C<List.combinations>|/type/List#routine_combinations» on it.
Expand Down Expand Up @@ -1246,8 +1253,8 @@ the method C<list> on the instance.
Defined as:
multi method batch(Int:D $batch --> Seq)
multi method batch(Int:D :$elems --> Seq)
multi method batch(Int:D $batch)
multi method batch(Int:D :$elems!)
Coerces the invocant to a C<list> by applying
its L«C<.list>|/routine/list» method and uses
Expand Down

0 comments on commit 832eac7

Please sign in to comment.