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

6
LINES

< > BotCompany Repo | #1011205 // indexOfNotPred - index of first element in list that doesn't match a predicate

JavaX fragment (include)

static int indexOfNotPred(L l, O pred) {
  for i over l:
    if (!checkCondition(pred, l.get(i)))
      ret i;
  ret -1;
}

Author comment

Began life as a copy of #1006686

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: #1011205
Snippet name: indexOfNotPred - index of first element in list that doesn't match a predicate
Eternal ID of this version: #1011205/1
Text MD5: f4b0f79e0e6cc3af31652af5d11fc4f2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-17 00:29:27
Source code size: 127 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 454 / 463
Referenced in: [show references]