Concatenate: Difference between revisions

From The K Language Wiki
Content added Content deleted
m (Lowercase title)
("Better category ordering, add redirects to categories, fix pseudo-adverb categories")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{lowercase title}}
{{primitive|x,y}}
{{primitive|x,y}}


Line 20: Line 19:
1 2 3!2 3 4
1 2 3!2 3 4
</pre>
</pre>

[[Category:Verbs]]
[[Category:Operator verbs]]
[[Category:Primitives]]

Latest revision as of 06:14, 9 July 2022

Concatenate
x,y

The concatenate builtin concatenates its two arguments into a single unit, based on the type of the arguments.

If both x and y are dictionaries, the result is a dictionary, and otherwise the result is an array.

 1,2
1 2

1 2,"abc"
(1
 2
 "a"
 "b"
 "c")

(1 2!2 3),2 3!3 4
1 2 3!2 3 4