Generic swap: Difference between revisions
→sed: add
m (→{{header|Wren}}: Now uses List.swap method.) |
(→sed: add) |
||
Line 3,057:
; (2 1)</syntaxhighlight>
=={{header|
There are no variables in ''sed''. Just a "pattern space" and a "hold space" — that's all. The <code>x</code> command exchanges the contents of both.
=={{header|Seed7}}==
A generic template to generate swap functions is defined with:
<syntaxhighlight lang="seed7">const proc: generate_swap (in type: aType) is func
|