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

11
LINES

< > BotCompany Repo | #1018533 // addToLocalMechList_uniq

JavaX fragment (include)

sS addToLocalMechList_uniq(S listName, S text) {
  ret addToLocalMechList_uniq(listName, lines(text));
}

sS addToLocalMechList_uniq(S listName, Collection<S> lines) {
  LS existing = tlft(localMechList_opt_raw_fresh(listName));
  LS newLines = listMinusSet(lines, existing);
  if (empty(newLines)) ret "No change";
  appendToLocalMechList(listName, lines(newLines));
  ret n2(l(newLines), "line") + " added";
}

Author comment

Began life as a copy of #1017257

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: #1018533
Snippet name: addToLocalMechList_uniq
Eternal ID of this version: #1018533/5
Text MD5: 09ea0d77c7612aac37fce6ad8c622527
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-03 13:56:16
Source code size: 421 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 236 / 302
Version history: 4 change(s)
Referenced in: [show references]