Sum: Difference between revisions

From The K Language Wiki
Content added Content deleted
("Add all appropriate categories to each verb")
("Trailing whitespace")
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
sum 1 2 3
sum 1 2 3
6.
6.
sum 1 2
sum 1 2
3.
3.
sum 1 2 67
sum 1 2 67
Line 17: Line 17:
{{works in|K7, K9}}
{{works in|K7, K9}}


[[Category:Named verbs]]
[[Category:Verbs]]
[[Category:Verbs]]
[[Category:Named verbs]]
[[Category:Primitives]]
[[Category:Primitives]]

Latest revision as of 07:59, 9 July 2022

Sum
sum x
Supported in K7, K9

sum is a primitive that is used to sum arrays or integers or characters.

It is equivalent to +/ in most K dialects.

 sum 1 2 3
6.
 sum 1 2
3.
 sum 1 2 67
70.
 sum "abc"
294.
Works in: K7, K9