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

11
LINES

< > BotCompany Repo | #1030338 // bsForPairsWithA

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

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

1  
static <A, B> L<B> bsForPairsWithA(A a, Iterable<Pair<A, B>> l) {
2  
  new L<B> out;
3  
  fOr (Pair<A, B> p : l)
4  
    if (eq(pairA(p), a))
5  
      out.add(pairB(p));
6  
  ret out;
7  
}
8  
9  
static <A, B> L<B> bsForPairsWithA(Iterable<Pair<A, B>> l, A a) {
10  
  ret bsForPairsWithA(a, l);
11  
}

Author comment

Began life as a copy of #1030263

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030338
Snippet name: bsForPairsWithA
Eternal ID of this version: #1030338/1
Text MD5: 3f1ff22ef2c41cb08509e64a3585ccce
Transpilation MD5: 7ed89123d427abc38c81efc833b6fd03
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-04 18:04:52
Source code size: 277 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 182 / 260
Referenced in: [show references]