Create dict: Difference between revisions
add K3 version
(uniqueness of keys) |
(add K3 version) |
||
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.
|