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

11
LINES

< > BotCompany Repo | #1013472 // countPred - synonym of nfilter - count objects in collection that match a predicate

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

Libraryless. Click here for Pure Java version (1744L/11K).

static int countPred(Iterable c, O pred) {
  ret nfilter(c, pred);
}

static int countPred(O pred, Iterable c) {
  ret nfilter(pred, c);
}

static <A> int countPred(Iterable<A> c, IF1<A, Bool> pred) {
  ret nfilter(c, pred);
}

Author comment

Began life as a copy of #1004349

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: #1013472
Snippet name: countPred - synonym of nfilter - count objects in collection that match a predicate
Eternal ID of this version: #1013472/3
Text MD5: c6161f82c9e83991ac04a312a9ce02ea
Transpilation MD5: fbef8b0b9ba29da90c03ddf06f865eb6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-08 17:37:48
Source code size: 240 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 429 / 518
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)