Subtract: Difference between revisions

From The K Language Wiki
Content added Content deleted
No edit summary
No edit summary
Line 2: Line 2:
The '''Subtract''' or '''Minus''' function, generally denoted by <code>-</code>, is used for subtraction in K.
The '''Subtract''' or '''Minus''' function, generally denoted by <code>-</code>, is used for subtraction in K.


The ''Subtract'' primitive is [[Atomicity|fully atomic.]]<syntaxhighlight>
The ''Subtract'' primitive is [[Atomicity|fully atomic.]]<pre>
1-2
1-2
-1
-1
Line 12: Line 12:
(-22 -33
(-22 -33
-6 4)
-6 4)
</pre>
</syntaxhighlight>

Revision as of 04:04, 9 July 2021

Subtract
x-y

The Subtract or Minus function, generally denoted by -, is used for subtraction in K.

The Subtract primitive is fully atomic.

 1-2
-1

 1 2 3 - 4 5 6
-3 -3 -3

 ((23;45);(3;4)) - ((45;78);(9;0))
(-22 -33
 -6 4)