Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1003767 // transformKeys - transform keys of map (returns HashMap)

JavaX fragment (include)

static Map transformKeys(Map map, O f) {
  new HashMap m;
  for (O key : keys(map))
    m.put(callF(f, key), map.get(key));
  ret m;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003767
Snippet name: transformKeys - transform keys of map (returns HashMap)
Eternal ID of this version: #1003767/1
Text MD5: ef508fcc9d7ab39718f6de7a282c60f5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-26 22:48:24
Source code size: 139 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 533 / 549
Referenced in: [show references]