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

17
LINES

< > BotCompany Repo | #1027757 // AllOnAllOperation

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

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

1  
// persistable (if you set "operation", make sure it's with a
2  
// persistable object)
3  
sclass AllOnAllOperation<A, B> implements Steppable {
4  
  Producer<Pair<A, B>> allOnAll; // e.g. an instance of AllOnAll<A, B>
5  
  
6  
  *() {}
7  
  *(Producer<Pair<A, B>> *allOnAll, IVF2<A, B> *operation) {}
8  
  
9  
  persistent swappable void operation(A a, B b) {}
10  
11  
  public bool step() {
12  
    Pair<A, B> p = allOnAll.next();
13  
    if (p == null) false;
14  
    operation(p.a, p.b);
15  
    true;
16  
  }
17  
}

Author comment

Began life as a copy of #1023892

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: #1027757
Snippet name: AllOnAllOperation
Eternal ID of this version: #1027757/7
Text MD5: cb73213120843589e6a777abe81371c7
Transpilation MD5: 99bbdab19f0a5c678efea3b09687ef05
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-20 23:50:53
Source code size: 480 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 321 / 673
Version history: 6 change(s)
Referenced in: [show references]