Methods

HashΒΆ

Hash(arr:Arr, cb:Fun)

Create a Hash from keys in arr using cb for values calculation
Source: stdlib.ngs:1765

arr

Keys of the hash to build

cb

Function to be called with one key at a time. Should calculate a value for the given key.

Returns

Hash

Example

Hash([1,2], F(x) x*2)  # {1: 2, 2: 4}