Libraryless. Click here for Pure Java version (2518L/16K).
static L mapCodeTokens(O f, L l) { L out = emptyList(l); for i over l: { O o = l.get(i); out.add(odd(i) ? callF(f, o) : o); } ret out; } static L mapCodeTokens(L l, O f) { ret mapCodeTokens(f, l); } static LS mapCodeTokens(LS tok, IF1<S> f) { ret mapCodeTokens(tok, (O) f); } static LS lambdaMapLike mapCodeTokens(IF1<S> f, LS tok) { ret mapCodeTokens(tok, f); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1014541 |
Snippet name: | mapCodeTokens - keeps N tokens as they are |
Eternal ID of this version: | #1014541/6 |
Text MD5: | 46c8dab77a158c17028d536a2bba3d3e |
Transpilation MD5: | fabfd000759905e51acbd453431929f1 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-12 12:32:45 |
Source code size: | 406 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 430 / 583 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1014558 - replaceCodeTokensUsingMap #1025568 - mapCodeTokens_javaTokWithBrackets #1029679 - mapNonCodeTokens - keeps C tokens as they are |