Skip to content

Commit cfd86f8

Browse files
authored
New material on type captures; work on introduction and parameter separators; some fixes here and there (#4669)
* Complete overhaul of section on double semicolon (;;) parameter separator in file Language/signatures.rakudoc * Expand section Type captures (adding text on coercion and constraints). Also various fixes. * correct definition of subset Even, and adjust output * clarify explanation re. Nil/is-default * further clarify difference between parameters and variables with default values when assigned Nil * restore text that apparently was unintentionally deleted in 2024 with commit 348e623 * fix sentence relationship in section "Constraining signatures of Callables", and make examples more pertinent * skip test for failing code & align code * sigilled -> sigiled * add missing formatting code * fix Num -> Numeric * captured types can in fact be used as return types. +make spaces consistent * fix rakudoc syntax (C<->> to C«->») and add note to pod.rakudoc * add example for using captured type as return type constraint * add example combining capture with type smiley * add resulting signatures to examples * add link to explanation of itemization * Show how itemization prevents flattening in slurpies. Move section 'Type captures' up, and sections on slurpies down. * Moving section 'Type captures' up keeps the material on type constraints together. * Moving sections on slurpies down so that the more elementary section 'Positional vs. named arguments' appears first. * consistent usage of puntuation before examples * Add basic slurpies to introduction
1 parent 3a50047 commit cfd86f8

File tree

4 files changed

+202
-129
lines changed

4 files changed

+202
-129
lines changed

doc/Language/perl-op.rakudoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ also used for method calls. So Perl's C«$arrayref->[7]» becomes
5252
Raku's C<$arrayref.[7]> and C«$user->name» becomes C<$user.name>.
5353
Note that dereferencing is rare in Raku.
5454

55-
Raku uses the C<->> to attach L<C<Signature>|/type/Signature>s to
55+
Raku uses the C«->» to attach L<C<Signature>|/type/Signature>s to
5656
L<C<Block>|/type/Block>s.
5757

5858
=head2 Auto-increment and auto-decrement

doc/Language/pod.rakudoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,16 @@ C<my $var = 1; say $var;>
550550

551551
C<my $var = 1; say $var;>
552552

553+
If the enclosed code itself contains an unmatched C«>»,
554+
enclose it in C<C« »>
555+
=for code :lang<rakudoc>
556+
C«sub f(Int --> Int) {}»
557+
558+
C«sub f(Int --> Int) {}»
559+
553560
=head2 Links
554561

555-
To create a link enclose it in C<L< >>:
562+
To create a link enclose it in C<L< >>
556563

557564
=for code :lang<rakudoc>
558565
Raku homepage L<https://raku.org>

0 commit comments

Comments
 (0)