Decorate-sort-undecorate idiom: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added note) |
|||
Line 667: | Line 667: | ||
<span style="color: #0000FF;">?</span><span style="color: #000000;">sort_by</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">split</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"Rosetta Code is a programming chrestomathy site"</span><span style="color: #0000FF;">),</span><span style="color: #7060A8;">length</span><span style="color: #0000FF;">)</span> |
<span style="color: #0000FF;">?</span><span style="color: #000000;">sort_by</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">split</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"Rosetta Code is a programming chrestomathy site"</span><span style="color: #0000FF;">),</span><span style="color: #7060A8;">length</span><span style="color: #0000FF;">)</span> |
||
<!--</syntaxhighlight>--> |
<!--</syntaxhighlight>--> |
||
Technically that does not decorate/undecorate and instead uses an anonymous parallel array, but it does only calculate each length once. |
Technically that does not decorate/undecorate and instead uses an anonymous parallel array or two, but it does only calculate each length once. |
||
{{out}} |
{{out}} |
||
<pre> |
<pre> |