We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eff7843 commit 7b7de10Copy full SHA for 7b7de10
doc/Type/Any.pod6
@@ -375,9 +375,20 @@ Coerce the invocant to L<Hash>.
375
376
Defined as:
377
378
- method hash(--> Hash:D) is nodal
+ proto method hash(|) is nodal
379
+ multi method hash(Any:U: --> Hash:D)
380
+ multi method hash(Any:D: --> Hash:D)
381
-Coerce the invocant to L<Hash>.
382
+Creates a new L<Hash|/type/Hash>, empty in the case the invocant is
383
+undefined, or coerces the invocant to an C<Hash> in the case it is
384
+defined.
385
+
386
+=begin code
387
+my $d; # $d is Any
388
+say $d.hash; # OUTPUT: {}
389
+$d.append: 'a', 'b';
390
+say $d.hash; # OUTPUT: {a => b}
391
+=end code
392
393
=head2 method Slip
394
0 commit comments