Skip to content

Commit

Permalink
Merge pull request Raku#56 from manwar/complete-function-interpolate
Browse files Browse the repository at this point in the history
Added method get_animal() to complete 'function interpolate' example.
  • Loading branch information
JJ authored Feb 27, 2019
2 parents f436540 + 891b080 commit 47e2f57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions categories/cookbook/01strings/01-00introduction.pl
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ =head2 Advanced Interpolation Control
say qh/We have %animal.elems() key in %animal{}/;
# interpolate functions only: both & and () are required
sub get_animal ($tag) { return %animal{$tag}; }
say q:f/The quick brown &get_animal('quick') jumps.../;
say qf/The quick brown &get_animal('quick') jumps.../;
Expand Down

0 comments on commit 47e2f57

Please sign in to comment.