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

7
LINES

< > BotCompany Repo | #1007606 // addDyn - add to list and create list if necessary

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (45L/1K).

meta-for Cl also as L {
  static <A> Cl<A> addDyn(Cl<A> l, A a) {
    if (l == null) l = new L;
    l.add(a);
    ret l;
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007606
Snippet name: addDyn - add to list and create list if necessary
Eternal ID of this version: #1007606/3
Text MD5: 13770ad1fb067a35256af548fed4943f
Transpilation MD5: 45d2689b8f12abc48c18d399044e711d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-01 22:35:39
Source code size: 132 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 621 / 752
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1007607 - removeDyn - remove from list and return null if empty
#1013092 - addToOrCreateList - synonym of addDyn - add to list and create list if necessary
#1023121 - addDyn_sync - add to list and create list if necessary, use synchroList
#1027848 - syncAddOrCreate - add to list and create synced list if necessary
#1030949 - Transpiler output of #1031393