Sort primes from list to a list: Difference between revisions
m
→{{header|Raku}}: numerically or lexicographically?
No edit summary |
Thundergnat (talk | contribs) m (→{{header|Raku}}: numerically or lexicographically?) |
||
Line 94:
=={{header|Raku}}==
<lang perl6>put <2 43 81 122 63 13 7 95 103>.grep( &is-prime ).sort</lang>
{{out}}
<pre>2 7 13 43 103</pre>
''Of course "sort ascending" is a little ambiguous. That ^^^ is numerically. This vvv is lexicographically.
<lang perl6>put <2 43 81 122 63 13 7 95 103>.grep( &is-prime ).sort: ~*</lang>
{{out}}
<pre>103 13 2 43 7</pre>
=={{header|Ring}}==
|