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

8
LINES

< > BotCompany Repo | #1035427 // pstackComputeAll - get all results from probabilistic function

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

Libraryless. Click here for Pure Java version (23705L/144K).

1  
// also takes a PStackComputable
2  
static <A> L<A> pstackComputeAll(VStack.Computable<A> f) {
3  
  new PStack stack;
4  
  new L<A> results;
5  
  stack.add(f, result -> results.add(result));
6  
  stepAll(stack);
7  
  ret results;
8  
}

Author comment

Began life as a copy of #1035388

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035427
Snippet name: pstackComputeAll - get all results from probabilistic function
Eternal ID of this version: #1035427/5
Text MD5: e608c5d494da06b779e2b56aa2b8ef11
Transpilation MD5: 72a6ed62a8152ab3d9a0096a05e87d45
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-08 20:48:46
Source code size: 220 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 163 / 252
Version history: 4 change(s)
Referenced in: [show references]