Skip to content

Commit

Permalink
Fix whitespace handling in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
stoned committed Jan 3, 2020
1 parent 44973b2 commit 3f8e740
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doc/Language/typesystem.pod6
Expand Up @@ -803,14 +803,15 @@ objects:
For example, in file C<config> we have:
C<a 1
b 2>
=for code :lang<text>
a 1
b 2
We can create an enum using it with this code:
=for code :skip-test<needs filesystem>
enum ConfigValues ('config'.IO.lines.map({ my ($key, $value) = $_.words; $key => $value }));
say ConfigValues.enums; # OUTPUT: «Map.new((a => 1, b => 2))␤»
=for code :skip-test<needs filesystem>
enum ConfigValues ('config'.IO.lines.map({ my ($key, $value) = $_.words; $key => $value }));
say ConfigValues.enums; # OUTPUT: «Map.new((a => 1, b => 2))␤»
Firstly, we read lines from C<config> file, split every line using
C<words> method and return resulting pair for every line, thus
Expand Down

0 comments on commit 3f8e740

Please sign in to comment.