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

11
LINES

< > BotCompany Repo | #1017818 // nlLogic_and

JavaX fragment (include)

static Exp nlLogic_and(Exp a, Exp b) {
  ret a == null ? b : b == null ? a : And(a, b);
}

static Exp nlLogic_and(L<Exp> l) {
  if (empty(l)) null;
  Exp e = last(l);
  for (int i = l(l)-2; i >= 0; i--)
    e = And(l.get(i), e);
  ret e;
}

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: #1017818
Snippet name: nlLogic_and
Eternal ID of this version: #1017818/3
Text MD5: 2e9fd8fae5f8a6ee6800634981a408fd
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-22 13:01:42
Source code size: 249 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 331 / 358
Version history: 2 change(s)
Referenced in: [show references]