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

16
LINES

< > BotCompany Repo | #1027988 // gazelle_deepZip_keepBrackets - Gazelle's magic function [backup 1]

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3081L/19K).

static SS gazelle_deepZip_keepBrackets(S inputA, S inputB, O... _) {
  SS map = gazelle_zip_keepBrackets(inputA, inputB);
  if (map == null) null;
  SS map2 = similarEmptyMap(map);
  for (S a, S b : map) {
    if (tok_isRoundOrCurlyBracketed(a) && tok_isRoundOrCurlyBracketed(b)) {
      S aa = tok_deRoundOrCurlyBracket(a);
      S bb = tok_deRoundOrCurlyBracket(b);
      SS subMap = gazelle_deepZip_keepBrackets(aa, bb, _);
      if (subMap == null) null;
      if (!putAllStrictlyIC(map2, subMap)) null;
    } else
      if (!strictPutIC(map2, a, b)) null;
  }
  ret map2;
}

Author comment

Began life as a copy of #1025738

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027988
Snippet name: gazelle_deepZip_keepBrackets - Gazelle's magic function [backup 1]
Eternal ID of this version: #1027988/1
Text MD5: 8da7bb8391da03b553f87fdd5e7eb8d2
Transpilation MD5: 1afdec6c7da27291ffd7c9e3783eadde
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-23 12:44:07
Source code size: 593 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 104 / 147
Referenced in: [show references]