Skip to content

Commit 4d48263

Browse files
committed
[List] switch rest of the examples away from REPL style
1 parent 201ee4d commit 4d48263

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

lib/List.pod

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,9 @@ Fails for infinite lists.
343343
344344
Example:
345345
346-
> my @foo = <a b c>; @foo.push: 1, 3 ... 11;
347-
a b c 1 3 5 7 9 11
346+
my @foo = <a b c>;
347+
@foo.push: 1, 3 ... 11;
348+
say @foo; # a b c 1 3 5 7 9 11
348349
349350
=head2 shift
350351
@@ -355,14 +356,10 @@ Removes and returns the first item from the list. Fails for an empty list.
355356
356357
Example:
357358
358-
> my @foo = <a b>;
359-
a b
360-
> @foo.shift;
361-
a
362-
> @foo.shift;
363-
b
364-
> @foo.shift;
365-
Element shifted from empty list
359+
my @foo = <a b>;
360+
say @foo.shift; # a
361+
say @foo.shift; # b
362+
say @foo.shift; # Element shifted from empty list
366363
367364
=head2 unshift
368365
@@ -374,7 +371,8 @@ Fails if C<@values> is infinite.
374371
375372
Example:
376373
377-
> my @foo = <a b c>; @foo.unshift: 1, 3 ... 11;
378-
1 3 5 7 9 11 a b c
374+
my @foo = <a b c>;
375+
@foo.unshift: 1, 3 ... 11;
376+
say @foo; # 1 3 5 7 9 11 a b c
379377
380378
=end pod

0 commit comments

Comments
 (0)