Skip to content

Commit

Permalink
Document the .are method
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Apr 29, 2022
1 parent 3072a43 commit c8f3317
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/Type/Any.pod6
Expand Up @@ -781,6 +781,24 @@ Instead of throwing away the first C<$n> elements, it throws away everything
I<but> the elements indicated by the WhateverCode, in this case all but the last
one.
=head2 method are
Defined as:
multi method are()
Return the strictest type / role to which all elements of the list will
smart-match. Return C<Nil> on an empty list.
say (1,2,3).are; # (Int)
say <a b c>.are; # (Str)
say <42 666>.are; # (IntStr)
say (42,666e0).are; # (Real)
say (42,i).are; # (Numeric)
say ("a",42,3.14).are; # (Cool)
Available as of release 2022.02 of the Rakudo compiler.
=head2 method prepend
Defined as:
Expand Down

0 comments on commit c8f3317

Please sign in to comment.