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

8
LINES

< > BotCompany Repo | #1036086 // elementBefore

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

Libraryless. Click here for Pure Java version (62L/1K).

static <A> A elementBefore(Cl<A> l, A a) {
  A last = null;
  if (l != null) for (b : l) {
    if (eq(a, b)) ret last;
    last = b;
  }
  null;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036086
Snippet name: elementBefore
Eternal ID of this version: #1036086/1
Text MD5: 24d2ca04a1307ef5a40430c5d35471b7
Transpilation MD5: 861109c664edd2b48886c2b47dc3c668
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-07 05:05:08
Source code size: 153 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 173
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)