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

11
LINES

< > BotCompany Repo | #1030263 // asForPairsWithB

JavaX fragment (include)

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

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

Author comment

Began life as a copy of #1027828

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1030263
Snippet name: asForPairsWithB
Eternal ID of this version: #1030263/2
Text MD5: 409b08b8332fda90bb75ab2713cc2b3a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-21 14:46:49
Source code size: 273 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 194 / 219
Version history: 1 change(s)
Referenced in: [show references]