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

11
LINES

< > BotCompany Repo | #1002874 // nlRemoveWord

JavaX fragment (include)

static Lisp nlRemoveWord(S word, Lisp in) {
  if (in.isLeaf() && eqic(in.head, word))
    ret lisp("[]");
  Lisp lisp = new Lisp(in.head);
  for (int i = 0; i < in.size(); i++) {
    Lisp translated = nlRemoveWord(word, in.get(i));
    if (!translated.is("[]", 0))
      lisp.add(translated);
  }
  ret lisp;
}

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: #1002874
Snippet name: nlRemoveWord
Eternal ID of this version: #1002874/1
Text MD5: d6e7fa8369061ec1b19890dfc078448c
Author: stefan
Category: eleu / nl
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-10 19:26:00
Source code size: 320 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 613 / 609
Referenced in: #1002875 - nlEscapeVariables - replaces all variables like $x with "$x" to make them harmless
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)