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

6
LINES

< > BotCompany Repo | #1019757 // mapItemsToListIndex

JavaX fragment (include)

1  
static <A> Map<A, Int> mapItemsToListIndex(L<A> l) {
2  
  new HashMap<A, Int> map;
3  
  for i over l:
4  
    map.put(l.get(i), i);
5  
  ret map;
6  
}

Author comment

Began life as a copy of #1014587

download  show line numbers  debug dex  old transpilations   

Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019757
Snippet name: mapItemsToListIndex
Eternal ID of this version: #1019757/1
Text MD5: f0c97d9b76448d1e29df48b0e5af6fb5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-25 02:13:13
Source code size: 139 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 287 / 337
Referenced in: [show references]