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

13
LINES

< > BotCompany Repo | #1018219 // ai_matchObjectWithMultipleVars

JavaX fragment (include)

1  
static Bool ai_matchObjectWithMultipleVars(LS vars, O result, SS matches) {
2  
  if (l(vars) == 2 && shortClassNameIs(result, 'Pair))
3  
    ret ai_matchMulti(vars, ll(strGet(result, 'a), strGet(result, 'b)), matches);
4  
5  
  if (l(vars) == 3 && shortClassNameIs(result, 'T3))
6  
    ret ai_matchMulti(vars, ll(strGet(result, 'a), strGet(result, 'b), strGet(result, 'c)), matches);
7  
    
8  
  if (result cast Collection)
9  
    if (l(result) == l(vars))
10  
      ret ai_matchMulti(vars, allToString(result), matches);
11  
12  
  null;
13  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018219
Snippet name: ai_matchObjectWithMultipleVars
Eternal ID of this version: #1018219/1
Text MD5: cd8222fd4b9377ae879a2c7a356276c8
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-10 15:42:29
Source code size: 517 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 376 / 406
Referenced in: [show references]