Permalink
Browse files

[List] switch rest of the examples away from REPL style

  • Loading branch information...
1 parent 201ee4d commit 4d482630a17ca3f3f5948a26f1534edbcdb3d6ee @moritz moritz committed Aug 27, 2012
Showing with 10 additions and 12 deletions.
  1. +10 −12 lib/List.pod
View
@@ -343,8 +343,9 @@ Fails for infinite lists.
Example:
- > my @foo = <a b c>; @foo.push: 1, 3 ... 11;
- a b c 1 3 5 7 9 11
+ my @foo = <a b c>;
+ @foo.push: 1, 3 ... 11;
+ say @foo; # a b c 1 3 5 7 9 11
=head2 shift
@@ -355,14 +356,10 @@ Removes and returns the first item from the list. Fails for an empty list.
Example:
- > my @foo = <a b>;
- a b
- > @foo.shift;
- a
- > @foo.shift;
- b
- > @foo.shift;
- Element shifted from empty list
+ my @foo = <a b>;
+ say @foo.shift; # a
+ say @foo.shift; # b
+ say @foo.shift; # Element shifted from empty list
=head2 unshift
@@ -374,7 +371,8 @@ Fails if C<@values> is infinite.
Example:
- > my @foo = <a b c>; @foo.unshift: 1, 3 ... 11;
- 1 3 5 7 9 11 a b c
+ my @foo = <a b c>;
+ @foo.unshift: 1, 3 ... 11;
+ say @foo; # 1 3 5 7 9 11 a b c
=end pod

0 comments on commit 4d48263

Please sign in to comment.