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

13
LINES

< > BotCompany Repo | #1011591 - all

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

Libraryless. Click here for Pure Java version (2478L/16K).

1  
sbool all(O pred, Collection l) {
2  
  if (l != null) for (O o : l) if (!isTrue(callF(pred, o))) false;
3  
  true;
4  
}
5  
6  
static <A> bool all(Iterable<A> l, IF1<A, Bool> f) {
7  
  if (l != null) for (A a : l) if (!f.get(a)) false;
8  
  true;
9  
}
10  
11  
static <A> bool lambdaMapLike all(IF1<A, Bool> f, Iterable<A> l) {
12  
  ret all(l, f);
13  
}

download  show line numbers  debug dex   

Travelled to 10 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1011591
Snippet name: all
Eternal ID of this version: #1011591/5
Text MD5: 7fe5d30bb970c782654ccbb76df7206d
Transpilation MD5: bff1de38fecca437e0a8eea2a556ec7b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-04 17:26:13
Source code size: 326 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 177 / 208
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1011591 & http://1011591.tinybrain.de