72
72
73
73
LIST.one
74
74
75
- Interprets the invocant as a list and creates an
75
+ Interprets the invocant as a list and creates a
76
76
C < one > -L < Junction|/type/Junction > from it.
77
77
78
78
say so 1 == (1, 2, 3).one; # True
88
88
89
89
LIST.none
90
90
91
- Interprets the invocant as a list and creates an
91
+ Interprets the invocant as a list and creates a
92
92
C < none > -L < Junction|/type/Junction > from it.
93
93
94
94
say so 1 == (1, 2, 3).none; # False
@@ -103,10 +103,10 @@ Interprets the invocant as a list, and returns that L<List|/type/List>.
103
103
104
104
= head2 method push
105
105
106
- The method push is defined for undefined invocants and allowes to autovivify
107
- undefined to an empty C < Array > , unless the undefined value implements
108
- C < Positional > already. The argument provided will then be pushed into the
109
- newly created Array.
106
+ The method push is defined for undefined invocants and allowes for
107
+ autovivifying undefined to an empty C < Array > , unless the undefined value
108
+ implements C < Positional > already. The argument provided will then be pushed
109
+ into the newly created Array.
110
110
111
111
my %h;
112
112
dd %h<a>; # Any (and therefor undefined)
@@ -155,13 +155,13 @@ Defined as:
155
155
multi method map(HyperIterable:D: █; :$label)
156
156
157
157
C < map > will iterate over the invocant and apply the number of positional
158
- parameters of the code object from the invocant per call. The returned values
158
+ parameters of the code object from the invocant per call. The returned values
159
159
of the code object will become elements of the returned C < Seq > .
160
160
161
161
= head2 method flat
162
162
163
- Interprets the invocant as a list, flattens it, and returns that list. Please
164
- note that C < .flat > will not solve the halting problem for you. If you flat
163
+ Interprets the invocant as a list, flattens it, and returns that list. Please
164
+ note that C < .flat > will not solve the halting problem for you. If you flat
165
165
an infinite list C < .flat > may return that infinite list, eating all your RAM
166
166
in the process.
167
167
@@ -196,7 +196,7 @@ Interprets the invocant as a list, and returns the last index of that list.
196
196
197
197
Interprets the invocant as a list, and constructs a list of
198
198
L < pairs|/type/Pair > from it, in the same way that assignment to a
199
- L < Hash|/type/Hash > does. That is, it takes two consecutive elements and
199
+ L < Hash|/type/Hash > does. That is, it takes two consecutive elements and
200
200
constructs a pair from them, unless the item in the key position already is a
201
201
pair (in which case the pair is passed is passed through, and the next
202
202
list item, if any, is considered to be a key again).
0 commit comments