Skip to content

Commit 4ea0a88

Browse files
committed
Add minor fixes
1 parent 46e71bf commit 4ea0a88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Language/hashmap.pod6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ By default, any object declared with the C<%> sigil will get the Associative
1616
role, and will by default behave like a hash, but this role will only provide
1717
the two methods above, as well as the default Hash behavior.
1818
19-
say (%).^name ;# OUTPUT: «Hash␤»
19+
say (%).^name ; # OUTPUT: «Hash␤»
2020
2121
Inversely, you cannot use the C<%> sigil if the C<Associative> role is not mixed
2222
in, but since this role does not have any associated properties, you will have
@@ -66,7 +66,7 @@ say %logger<2018-04-22>:exists; # OUTPUT: «False»
6666
=end code
6767
6868
In this case, we are defining a logger with Associative semantics that would be
69-
able to use dates (or a part of them) as keys. Since we are parametrizing
69+
able to use dates (or a part of them) as keys. Since we are parameterizing
7070
C<Associative> to those particular classes, C<of> will return the value type we
7171
have used, C<Cool> in this case (we can log lists or strings only). Mixing the C<Associative> role gives it the right to use the C<%> sigil; binding is needed in the definition since C<%>-sigilled variables get by default the C<Hash> type.
7272
@@ -173,7 +173,7 @@ my %h = e => f => 'g';
173173
174174
This, however, will effectively define a nested hash:
175175
176-
m: my %h = e => { f => 'g'};
176+
my %h = e => { f => 'g' };
177177
say %h<e>.^name; # OUTPUT: «Hash␤»
178178
say %h<e><f>; # OUTPUT: «g␤»
179179
@@ -260,7 +260,7 @@ instead:
260260
Note: Rakudo implementation currently erroneously applies L<the same
261261
rules|/routine/{ }#(Operators)_term_{_}> for C<:{ }> as it does for C<{ }> and
262262
can construct a L<Block> in certain circumstances. To avoid that, you can
263-
instantiate a parameterized Hash directly. Parameterization of C<%>-sigiled
263+
instantiate a parameterized Hash directly. Parameterization of C<%>-sigilled
264264
variables is also supported:
265265
266266
my Num %foo1 = "0" => 0e0; # Str keys and Num values

0 commit comments

Comments
 (0)