Random sentence from book: Difference between revisions

m
→‎{{header|Raku}}: tweaks and twiddles
(→‎{{header|Raku}}: Fixed to preserve commas)
m (→‎{{header|Raku}}: tweaks and twiddles)
Line 814:
shift @sentence;
redo if @sentence < 7;
@sentence.push:join(' ').' if @sentence[*-1] !~~ tc.subst(/\s(<:punct>)/, {$0}, :g);
@sentence[*-2] ~= @sentence.pop ~ "\n";
@sentence.join(' ').tc
}
 
say sentence() ~ "\n" for ^10;</lang>
{{out|Sample output}}
<pre>To the inhabitants calling itself the Committee of Public Supply seized the opportunity of slightly shifting my position, which had caused a silent mass of smoke rose slanting and barred the face.
10,343

edits