Skip to content

Commit b023a9a

Browse files
committed
Make xtest pass
1 parent 0770f3a commit b023a9a

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

doc/Type/Routine.pod6

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,24 +181,26 @@ The C<is pure> trait is a promise by the programmer to the compiler that it
181181
can constant-fold
182182
calls to such functions when the arguments are known at compile time.
183183
184-
sub syllabes() is pure {
185-
say "Generating syllabes";
184+
sub syllables() is pure {
185+
say "Generating syllables";
186186
my @vowels = <a e i o u>;
187187
return @vowels.append: <k m n sh d r t y> X~ @vowels;
188188
}
189189
190190
To see it an action with a particular compiler you can try this example:
191191
192+
=begin code :preamble<sub syllables {}>
192193
BEGIN { say ‘Begin’ }
193194
say ‘Start’;
194-
say (^100).map: { syllabes().pick(2..5).join("") };
195+
say (^100).map: { syllables().pick(2..5).join("") };
195196
196197
197198
# Example output:
198199
# Begin
199-
# Generating syllabes
200+
# Generating syllables
200201
# Start
201202
# (matiroi yeterani shoriyuru...
203+
=end code
202204
203205
204206
Essentially this allows the compiler to perform some operations at

doc/Type/Signature.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ sense for a routine to accept. This can be done with the C<:U> type
239239
constraint, which checks the value passed if it is a I<type object>,
240240
rather than an object instance.
241241
242-
sub can-turn-into(Str $þing, Any:U $type) {
243-
return so $þing.$type;
242+
sub can-turn-into(Str $string, Any:U $type) {
243+
return so $string.$type;
244244
}
245245
say can-turn-into("3", Int);
246246
say can-turn-into("6.5", Int);

xt/code.pws

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ majf
242242
makequestionable
243243
manymanymany
244244
matchobject
245+
matiroi
245246
maybeval
246247
mday
247248
messageboxa
@@ -340,6 +341,7 @@ saysomething
340341
setcallback
341342
setgoal
342343
sev
344+
shoriyuru
343345
shortname
344346
skippingarray
345347
sl
@@ -431,6 +433,7 @@ xoooo
431433
xt
432434
xyz
433435
yday
436+
yeterani
434437
yourapp
435438
yourmodule
436439
yournick

0 commit comments

Comments
 (0)