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.
Point moveRight = origin.with(x=5);
console.
Point moveUp = moveRight.with(y=3);
console.
}
}
</syntaxhighlight>
{{out}}
<pre>
origin=(x=0, y=0)
moveRight(x=5)=(x=5, y=0)
moveUp(y=3)=(x=5, y=3)
</pre>
=={{header|Elixir}}==
|