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

static <A, B> L<B> bsForPairsWithA(A a, Iterable<Pair<A, B>> l) {
  new L<B> out;
  fOr (Pair<A, B> p : l)
    if (eq(pairA(p), a))
      out.add(pairB(p));
  ret out;
}

static <A, B> L<B> bsForPairsWithA(Iterable<Pair<A, B>> l, A a) {
  ret bsForPairsWithA(a, l);
}

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: 109 / 158
Referenced in: [show references]