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

7
LINES

< > BotCompany Repo | #1003418 // slurp - grab objects through a function until it returns null

JavaX fragment (include)

static L slurp(O o, S function) {
  new L l;
  O x;
  while ((x = call(o, function)) != null)
    l.add(x);
  ret l;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003418
Snippet name: slurp - grab objects through a function until it returns null
Eternal ID of this version: #1003418/1
Text MD5: 20b6d250818121d0f6472c95cc41fb02
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-03 00:36:07
Source code size: 124 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 584 / 643
Referenced in: [show references]