Hash from two arrays: Difference between revisions

 
Line 1,311:
Using the append operator would silently overwrite hash values for matching keys, but the more() function will not.
<syntaxhighlight lang="langur">val .new = foldfrom(
fn(.hash, .key, .value) more .hash, h{.key: .value},
h{}hash(), fw/a b c d/, [1, 2, 3, 4],
)
 
Line 1,318:
 
{{out}}
<pre>h{"d": 4, "a": 1, "b": 2, "c": 3}</pre>
 
=={{header|Lasso}}==
885

edits