Author: pmichaud Date: 2009-06-12 18:29:50 +0200 (Fri, 12 Jun 2009) New Revision: 27060
Modified: docs/Perl6/Spec/S04-control.pod Log: [spec]: Correct buglet in example -- squaring elements of array is @a ?\194?\187**?\194?\187 2, not @a [**] 2. Modified: docs/Perl6/Spec/S04-control.pod =================================================================== --- docs/Perl6/Spec/S04-control.pod 2009-06-11 20:55:48 UTC (rev 27059) +++ docs/Perl6/Spec/S04-control.pod 2009-06-12 16:29:50 UTC (rev 27060) @@ -518,7 +518,7 @@ statement, or if you want to attach multiple statements, you must either use the curly form or surround the entire expression in brackets of some sort: - @primesquares = (do $_ if prime($_) for 1..100) [**] 2; + @primesquares = (do $_ if prime($_) for 1..100) »**» 2; Since a bare expression may be used as a statement, you may use C<do> on an expression, but its only effect is to function as an unmatched @@ -529,7 +529,7 @@ the syntax inside brackets is a semicolon-separated list of statements, so the above can in fact be written: - @primesquares = ($_ if prime($_) for 1..100) [**] 2; + @primesquares = ($_ if prime($_) for 1..100) »**» 2; This basically gives us list comprehensions as rvalue expressions: