Skip to content

Commit 81981bd

Browse files
committed
Some rewriting and eliminating a TODO
1 parent b62ad10 commit 81981bd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

doc/Language/subscripts.pod6

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
=SUBTITLE Accessing data structure elements by index or key
66
7-
Often one needs to refer to a specific element (or specific slice of
7+
One often needs to refer to a specific element (or slice of
88
elements) of a collection or data structure. Borrowing from mathematical
99
notation where the components of a vector I<v> would be referred to as
1010
I<v₁, v₂, v₃>, this concept is called "subscripting" (or "indexing") in
@@ -649,9 +649,7 @@ subscripting interface.
649649
650650
=head2 Custom type example
651651
652-
=comment TODO: Maybe factor this out into a tutorial page
653-
654-
Imagine a HTTP::Header type which, despite being a custom class with special
652+
Imagine a C<HTTP::Header> type which, despite being a custom class with special
655653
behavior, can be indexed like a hash:
656654
657655
=begin code
@@ -667,7 +665,7 @@ behavior, can be indexed like a hash:
667665
my $rawheader = $request.header.Str; # stringify according to HTTP spec
668666
=end code
669667
670-
The simplest way to implement this class, would be to give it an attribute of
668+
A simple way to implement this class would be to give it an attribute of
671669
type L<Hash>, and delegate all subscripting and iterating related functionality
672670
to that attribute (using a custom type constraint to make sure users don't
673671
insert anything invalid into it):

0 commit comments

Comments
 (0)