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

11
LINES

< > BotCompany Repo | #1032200 // applyUntilEqual_goOneBackOnNull

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

Transpiled version (3068L) is out of date.

static <A> A lambdaMapLike applyUntilEqual_goOneBackOnNull(IF1<A> f, A o) {
  while ping (true) {
    A o2 = f.get(o);
    if (o2 == null || eq(o, o2)) ret o;
    o = o2;
  }
}

static <A> A lambdaMapLike applyUntilEqual_goOneBackOnNull(A o, IF1<A> f) {
  ret applyUntilEqual_goOneBackOnNull(f, o);
}

Author comment

Began life as a copy of #1014084

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1032200
Snippet name: applyUntilEqual_goOneBackOnNull
Eternal ID of this version: #1032200/4
Text MD5: df7e267cad445cc5d560e6984650bccf
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-13 17:24:44
Source code size: 306 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 90 / 142
Version history: 3 change(s)
Referenced in: [show references]