Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1030126 // nonCodeTokens

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2517L/16K).

1  
static LS nonCodeTokens(LS tok) {
2  
  int n = l(tok);
3  
  LS l = emptyList((n+1)/2);
4  
  for (int i = 0; i < n; i += 2)
5  
    l.add(tok.get(i));
6  
  ret l;
7  
}

Author comment

Began life as a copy of #1001111

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030126
Snippet name: nonCodeTokens
Eternal ID of this version: #1030126/1
Text MD5: d9e141ef4627ba6578d537a44fa65c10
Transpilation MD5: 9495cef4d855fa2098b4a43c6695bcb7
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-10 12:13:24
Source code size: 153 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 264
Referenced in: [show references]