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

7
LINES

< > BotCompany Repo | #1021262 // getOrKeep_tryUncurlied - get from map or keep key if not in map. try uncurly()

JavaX fragment (include)

1  
static S getOrKeep_tryUncurlied(SS map, S a) {
2  
  S v = map.get(a);
3  
  if (v != null) ret v;
4  
  S b = uncurly(a);
5  
  if (a != b && (v = map.get(b)) != null) ret v;
6  
  ret a;
7  
}

Author comment

Began life as a copy of #1005778

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021262
Snippet name: getOrKeep_tryUncurlied - get from map or keep key if not in map. try uncurly()
Eternal ID of this version: #1021262/3
Text MD5: d10543ac5222a66c131ed69f00b119be
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-06 12:39:34
Source code size: 176 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 338 / 387
Version history: 2 change(s)
Referenced in: [show references]