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

7
LINES

< > BotCompany Repo | #1028824 - tok_groupFirstNTokens

JavaX fragment (include)

sS tok_groupFirstNTokens(S s, int n) {
  ret tok_groupFirstNTokens(javaTokWithAllBrackets(s), n);
}

sS tok_groupFirstNTokens(LS tok, int n) {
  ret first(tok) + curly(joinSubList(tok, 1, n*2)) + joinSubList(tok, n*2);
}

Author comment

Began life as a copy of #1028820

download  show line numbers  debug dex   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028824
Snippet name: tok_groupFirstNTokens
Eternal ID of this version: #1028824/2
Text MD5: 08db8ab90b95e6e3d4b8f2ba2c797982
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-09 14:19:48
Source code size: 226 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 30 / 38
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1028824 & http://1028824.tinybrain.de