Create dict: Difference between revisions
"Better category ordering, add redirects to categories, fix pseudo-adverb categories"
(atom extension) |
("Better category ordering, add redirects to categories, fix pseudo-adverb categories") |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1:
{{primitive|.x<br>x!y}}
The '''create dict''' primitive, a.k.a. '''map'''
==== K3 ====
Takes a an array of pairs and converts it to a dictionary.
<pre>
.((`a;10);(`b;20))
.((`a;10;)
(`b;20;))
</pre>
{{works in|Kona}}
==== K6+ ====
Takes two lists of equal length and makes a [[dictionary]] using the left argument as keys, and the right argument as the values.
Uniqueness of the keys is not enforced.
<pre>
Line 13 ⟶ 27:
`a`b!2
`a`b!2 2
[[Category:Verbs]]
[[Category:Operator verbs]]
[[Category:Primitives]]
|