Libraryless. Click here for Pure Java version (5192L/28K).
1 | static <A> L<A> lambdaMapLike varyList(IF1<A> varyElement, L<A> l) { |
2 | if (empty(l)) null; |
3 | int i = randomIndex(l); |
4 | A varied = varyElement.get(l.get(i)); |
5 | if (varied == null) null; |
6 | ret listWithSingleElementChanged(l, i, varied); |
7 | } |
Began life as a copy of #1006086
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, iveijnkanddl, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034898 |
Snippet name: | varyList |
Eternal ID of this version: | #1034898/1 |
Text MD5: | 80558162174275f68a02f8e8fced9afe |
Transpilation MD5: | 651c3db7dc89707e18783ac4240d9a47 |
Author: | stefan |
Category: | javax / genetic optimization |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-13 04:53:46 |
Source code size: | 242 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 131 / 195 |
Referenced in: | [show references] |