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

6
LINES

< > BotCompany Repo | #1004291 // mergeMappings - merge two maps if no conflicts

JavaX fragment (include)

static <A, B> Map<A, B> mergeMappings(Map<A, B> a, Map<A, B> b) {
  for (A var : keys(a))
    if (b.containsKey(var) && neq(a.get(var), b.get(var)))
      null; // fail
  ret mergeMaps(a, b);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004291
Snippet name: mergeMappings - merge two maps if no conflicts
Eternal ID of this version: #1004291/1
Text MD5: 16a9309372741e7414c726d39a6ed477
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-12 19:06:03
Source code size: 200 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 635 / 586
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)