Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds better example for Any.keys
Eliminates the class example, and adds pointers. Refs #1731
  • Loading branch information
JJ committed Nov 11, 2018
1 parent d5d9448 commit fadb13b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/Type/Any.pod6
Expand Up @@ -574,7 +574,13 @@ Defined as:
For defined L<Any> returns its L<keys> after calling C<list> on it,
otherwise calls C<list> and returns it.
say Any.keys; # OUTPUT: «()␤»
my $setty = Set(<Þor Oðin Freija>);
say $setty.keys; # OUTPUT: «(Þor Oðin Freija)␤»
See also L<C<List.keys>|/type/List#routine_keys>.
Trying the same on a class will return an empty list, since most of them
don't really have keys.
=head2 method flatmap
Expand Down

0 comments on commit fadb13b

Please sign in to comment.