Hash from two arrays: Difference between revisions

Content added Content deleted
No edit summary
Line 856: Line 856:
['one 'two 'three 'four] [1 2 3 4] >table</lang>
['one 'two 'three 'four] [1 2 3 4] >table</lang>


=={{header|Langur}}==
=={{header|langur}}==
=== the easy way ===
=== the easy way ===
<lang Langur>writeln toHash ["a", "b", "c", "d"], [1, 2, 3, 4]</lang>
<lang langur>writeln toHash ["a", "b", "c", "d"], [1, 2, 3, 4]</lang>


=== a longer way ===
=== a longer way ===
<lang Langur>val .new = foldfrom(
<lang langur>val .new = foldfrom(
f(.hash, .key, .value) .hash ~ h{.key: .value},
f(.hash, .key, .value) .hash ~ h{.key: .value},
h{},
h{},