Named parameters: Difference between revisions

Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag
(Add Ecstasy example)
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag)
Line 603:
{
Point origin = new Point(0, 0);
console.printlnprint($"origin={origin}");
Point moveRight = origin.with(x=5);
console.printlnprint($"moveRight(x=5)={moveRight}");
Point moveUp = moveRight.with(y=3);
console.printlnprint($"moveUp(y=3)={moveUp}");
}
}
</syntaxhighlight>
 
{{out}}
Output:
<pre>
<syntaxhighlight>
origin=(x=0, y=0)
moveRight(x=5)=(x=5, y=0)
moveUp(y=3)=(x=5, y=3)
</pre>
</syntaxhighlight>
 
=={{header|Elixir}}==
162

edits