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

11
LINES

< > BotCompany Repo | #1012030 // ai_parseTriple - now also allows pairs (extends them with -> .)

JavaX fragment (include)

static Map<S, T3<S>> ai_parseTriple_cache = synchronizedMRUCache(1000);

static T3<S> ai_parseTriple(S s) {
  T3<S> t = ai_parseTriple_cache.get(s);
  if (t != null) ret t;
  L<S> l = map tok_unCurlyBracket(splitAtSimpleArrow(tok_combineCurlyBrackets_keep(javaTok(s))));
  if (l(l) == 2) l.add(".");
  t = listToTriple(l);
  ai_parseTriple_cache.put(s, t);
  ret t;
}

Author comment

Began life as a copy of #1011302

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1012030
Snippet name: ai_parseTriple - now also allows pairs (extends them with -> .)
Eternal ID of this version: #1012030/5
Text MD5: 59133b41542c0814ac84bf4508d77286
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-09 23:16:48
Source code size: 377 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 360 / 381
Version history: 4 change(s)
Referenced in: [show references]