static <A> L<A> oddEntries(L<A> l) { int n = l(l)/2; L<A> out = emptyList(n); for i to n: out.add(l.get(i*2+1)); ret out; }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024709 |
| Snippet name: | oddEntries - entries of list at odd positions (counting from 0) |
| Eternal ID of this version: | #1024709/3 |
| Text MD5: | a7a3fcff45456b8d9121dc700bbcdee6 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-09-01 11:34:10 |
| Source code size: | 141 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 428 / 480 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |