Libraryless. Click here for Pure Java version (3548L/19K).
static <A> WithProbability<A> withProbability(double probability, A a) { ret WithProbability(probability, a); } static <A> L<WithProbability<A>> withProbability(IF1<A, Double> makeProbability, Iterable<A> l) { ret map(a -> withProbability(makeProbability.get(a), a), l); }
Began life as a copy of #1028471
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031512 |
| Snippet name: | withProbability - make WithProbability |
| Eternal ID of this version: | #1031512/4 |
| Text MD5: | d60cd22be50f9c6ea26a9538fe0282f9 |
| Transpilation MD5: | edfbe45a2cc84e087d7a6f54b5460b29 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-20 05:12:15 |
| Source code size: | 283 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 419 / 559 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |