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

16
LINES

< > BotCompany Repo | #1018214 // nlLogic_transformShallow - doesn't go inside Func

JavaX fragment (include)

1  
static Exp nlLogic_transformShallow(Exp e, F1<Exp> f) {
2  
  if (e == null) null;
3  
  if (e cast And)
4  
    ret And(nlLogic_transformShallow(e.a, f), nlLogic_transformShallow(e.b, f));
5  
  if (e cast ExpNot)
6  
    ret ExpNot(nlLogic_transformShallow(e.a, f));
7  
  ret callF(f, e);
8  
}
9  
10  
static IfThen nlLogic_transformShallow(IfThen rule, F1<Exp> f) {
11  
  if (rule == null) null;
12  
  rule = (IfThen) shallowClone(rule);
13  
  rule.in = nlLogic_transformShallow(rule.in, f);
14  
  rule.out = nlLogic_transformShallow(rule.out, f);
15  
  ret rule;
16  
}

Author comment

Began life as a copy of #1017880

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: #1018214
Snippet name: nlLogic_transformShallow - doesn't go inside Func
Eternal ID of this version: #1018214/7
Text MD5: 8b3733a214a8fad8ae9160fe47f4ed3a
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 12:36:03
Source code size: 530 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 281 / 324
Version history: 6 change(s)
Referenced in: [show references]