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

13
LINES

< > BotCompany Repo | #1015378 // mapAndRecordToMap

JavaX fragment (include)

static L mapAndRecordToMap(Map recordMap, Iterable l, O f) {
  ret mapAndRecordToMap(recordMap, f, l);
}

static L mapAndRecordToMap(Map recordMap, O f, Iterable l) {
  L x = emptyList(l);
  if (l != null) for (O o : l) {
    O b = callF(f, o);
    if (recordMap != null) recordMap.put(o, b);
    x.add(b);
  }
  ret x;
}

Author comment

Began life as a copy of #1003239

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015378
Snippet name: mapAndRecordToMap
Eternal ID of this version: #1015378/5
Text MD5: 7467cd23eb1f548bb92987205bf4c731
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-13 15:00:38
Source code size: 333 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 382
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1015384 - mapAndRecordToMap_reversed