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

14
LINES

< > BotCompany Repo | #1007822 // lispEqic - Lisp equality ignoring case

JavaX fragment (include)

static bool lispEqic(Lisp a, Lisp b) {
  if (a == null) ret b == null;
  if (neqic(a.head, b.head)) false;
  int n = l(a.args);
  if (n != l(b.args)) false;
  for i to n:
    if (!lispEqic(a.args.get(i), b.args.get(i))) false;
  true;
}

static bool lispEqic(Lisp a, S b) {
  if (a == null) ret b == null;
  ret nempty(a.args) && eqic(a.head, b);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007822
Snippet name: lispEqic - Lisp equality ignoring case
Eternal ID of this version: #1007822/2
Text MD5: 46dee3fc864009a2c87d975f34a8877f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-20 23:31:25
Source code size: 363 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 428 / 551
Version history: 1 change(s)
Referenced in: [show references]