Libraryless. Click here for Pure Java version (4091L/23K).
static <A> L<WithSideValue<Int, A>> indexAsSideValue(L<A> l) { L<WithSideValue<Int, A>> out = emptyList(l); int n = l(l); for i to n: out.add(withSideValue(i, l.get(i))); ret out; }
Began life as a copy of #1027129
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033149 | 
| Snippet name: | indexAsSideValue | 
| Eternal ID of this version: | #1033149/2 | 
| Text MD5: | 0789955cca3b2cc0b27d9ac9efa4477d | 
| Transpilation MD5: | 11af507dc93e027e0cf83ce8713c981b | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2021-10-15 19:01:52 | 
| Source code size: | 199 bytes / 7 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 407 / 525 | 
| Version history: | 1 change(s) | 
| Referenced in: | [show references] |