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

11
LINES

< > BotCompany Repo | #1018533 // addToLocalMechList_uniq

JavaX fragment (include)

1  
sS addToLocalMechList_uniq(S listName, S text) {
2  
  ret addToLocalMechList_uniq(listName, lines(text));
3  
}
4  
5  
sS addToLocalMechList_uniq(S listName, Collection<S> lines) {
6  
  LS existing = tlft(localMechList_opt_raw_fresh(listName));
7  
  LS newLines = listMinusSet(lines, existing);
8  
  if (empty(newLines)) ret "No change";
9  
  appendToLocalMechList(listName, lines(newLines));
10  
  ret n2(l(newLines), "line") + " added";
11  
}

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: 343 / 391
Version history: 4 change(s)
Referenced in: [show references]