static L xtok_joinBrackets(L tok) { new L t; Map<Int, Int> map = getBracketMap(tok); for (int i = 0; i < l(tok); i++) { Int dest = map.get(i); if (dest != null) { t.add(cncAddFirstAndLast(subList(tok, i, dest+1))); i = dest; } else t.add(tok.get(i)); } ret t; }
Began life as a copy of #1003150
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008799 |
Snippet name: | xtok_joinBrackets |
Eternal ID of this version: | #1008799/2 |
Text MD5: | 72dc3f0f6292f3233edd84f8dfd397d7 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-09 02:05:19 |
Source code size: | 313 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 488 / 501 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1008803 - xtok_joinBrackets2 |