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

6
LINES

< > BotCompany Repo | #1008256 // dropMatchingPrefixList - drop elements of a list as long as they match those in another list

JavaX fragment (include)

static <A> L<A> dropMatchingPrefixList(L<A> l, L<A> b) {
  int toDrop = 0;
  while (toDrop < l(l) && eq(get(l, toDrop), get(b, toDrop)))
    ++toDrop;
  ret dropFirst(toDrop, l);
}

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: #1008256
Snippet name: dropMatchingPrefixList - drop elements of a list as long as they match those in another list
Eternal ID of this version: #1008256/1
Text MD5: c36825bf3c8694c58c3b7342493dcf2d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-03 14:41:27
Source code size: 185 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 405 / 501
Referenced in: [show references]