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

12
LINES

< > BotCompany Repo | #1013195 // matchBigX

JavaX fragment (include)

static S matchBigX(S pat, S s) {
  L<S> tokPat = javaTokC(pat), tok = javaTokC(s);
  if (l(tokPat) != l(tok)) null;
  new Var<S> x;
  for i over tokPat: {
    S p = tokPat.get(i), t = tok.get(i);
    if (eq(p, "X")) {
      if (!strictSetIC(x, t)) null;
    } else if (neqic(p, t)) null;
  }
  ret unnull(x!);
}

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: #1013195
Snippet name: matchBigX
Eternal ID of this version: #1013195/5
Text MD5: 6710996b77e82cfa655f58455f8eb7c4
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-27 06:59:55
Source code size: 324 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 343 / 378
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)