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).

1  
static int countPred(Iterable c, O pred) {
2  
  ret nfilter(c, pred);
3  
}
4  
5  
static int countPred(O pred, Iterable c) {
6  
  ret nfilter(pred, c);
7  
}
8  
9  
static <A> int countPred(Iterable<A> c, IF1<A, Bool> pred) {
10  
  ret nfilter(c, pred);
11  
}

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: 428 / 517
Version history: 2 change(s)
Referenced in: [show references]