Hash from two arrays: Difference between revisions

(Added Pike implementation)
Line 883:
 
=== 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(
f(.hash, .key, .value) more .hash ~, h{.key: .value},
h{}, w/a b c d/, [1, 2, 3, 4],
w/a b c d/,
[1, 2, 3, 4],
)
 
885

edits