Hash from two arrays: Difference between revisions
Content added Content deleted
(Added Pike implementation) |
Langurmonkey (talk | contribs) |
||
Line 883: | Line 883: | ||
=== a longer way === |
=== a longer way === |
||
Using the append operator would silently overwrite hash values for matching keys, but the more() function will not. |
|||
<lang langur>val .new = foldfrom( |
<lang langur>val .new = foldfrom( |
||
f(.hash, .key, .value) .hash |
f(.hash, .key, .value) more .hash, h{.key: .value}, |
||
h{}, |
h{}, w/a b c d/, [1, 2, 3, 4], |
||
w/a b c d/, |
|||
[1, 2, 3, 4], |
|||
) |
) |
||