map_idx_key_val multimethod

Methods

map_idx_key_val(hl:HashLike, mapper:Fun) Source: stdlib.ngs:821
Undocumented
map_idx_key_val(h:Hash, mapper:Fun) Source: stdlib.ngs:2497
Map a Hash

Parameters

hHash with source keys and values
mapperFunction to be called with sequential zero-based index, keys and values from h

Returns

Arr

Example

{'a': 1, 'b': 2}.map_idx_key_val(F(i, k, v) "${i}-${k}-$v")  # ['0-a-1', '1-b-2']