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

9
LINES

< > BotCompany Repo | #1027479 // firstNotSeen_nAttempts

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

Libraryless. Click here for Pure Java version (2198L/14K).

static <A> A firstNotSeen_nAttempts(int n, Set<A> seen, IF0<A> maker) {
  repeat n {
    ping();
    A a = maker!;
    if (seen.add(a))
      ret a;
  }
  null;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027479
Snippet name: firstNotSeen_nAttempts
Eternal ID of this version: #1027479/2
Text MD5: b91a1444f01b366e6f01c9e6e5e02c3e
Transpilation MD5: 3271c82660aa278b4d8642c37ee0787b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-22 16:30:59
Source code size: 170 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 245
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)