Long literals, with continuations: Difference between revisions

m
(→‎{{header|Raku}}: Add a Raku example)
Line 198:
put 'Shortest element name: ', %periodic<table>.sort( -*.<name>.chars ).tail.<name>;
put 'Symbols for elements whose name starts with "P": ', %periodic<table>.grep( *.<name>.starts-with('P') )».<symbol>;
put "Elements with molecular weight between 20 & 40:\n ",%periodic<table>.grep( {+.<weight> ~~ Numeric and 20 < .<weight> < 40} )».<name>;</lang>
put "SCRN: ", %periodic<table>[87,17,92]».<symbol>.join.tclc;</lang>
{{out}}
<pre>Revision date: 2020-03-23
Line 208 ⟶ 209:
Symbols for elements whose name starts with "P": P K Pd Pr Pm Pt Po Pa Pu
Elements with molecular weight between 20 & 40:
Neon Sodium Magnesium Aluminum Silicon Phosphorus Sulfur Chlorine Potassium Argon</pre>
SCRN: Raku</pre>
 
=={{header|REXX}}==
10,333

edits