Amend: Difference between revisions
no edit summary
(add amend) |
No edit summary |
||
Line 1:
{{primitive|@[x;y[;z
'''Amend''' is a special form of the <code>@</code> verb which takes multiple arguments.
Line 6:
* <code>x</code> is an array to amend
* <code>y</code> is the index(or indices) to amend
* <code>z</code>(optional), is the function to
* <code>u</code> is
3 argument amend always acts as an element replacement function, since <code>z</code> is [[right|<code>:</code>]] if it is omitted.
<code>x</code> can be a value or a symbol. If given a symbol, amend will modify the variable that is indicated by the symbol.
Line 14 ⟶ 16:
v
1 2 3
@[v;1
1 3 3
v
1 2 3
@[`v;1
v
1 2 3</pre>
== ngn/k ==
ngn/k's amend has <code>u</code> as the optional argument, instead of having <code>z</code> as an optional argument.
|