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

5
LINES

< > BotCompany Repo | #1021769 // withPreContext

JavaX fragment (include)

static <A> L<A> withPreContext(int n, L<A> l, A item) {
  int i = indexOf(l, item);
  if (i < 0) null;
  ret subList(l, i-n+1, i+1);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021769
Snippet name: withPreContext
Eternal ID of this version: #1021769/1
Text MD5: 0c5f83e4ce5ddc93f2a424c19c141970
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-26 11:12:26
Source code size: 138 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 212
Referenced in: [show references]