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

9
LINES

< > BotCompany Repo | #1030298 - applyWhileNotNull

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

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

static <A> A lambdaMapLike applyWhileNotNull(IF1<A> f, A o) {
  if (f == null || o == null) ret o;
  while licensed {
    A o2 = f.get(o);
    if (o == null) break;
    o = o2;
  }
  ret o;
}

Author comment

Began life as a copy of #1028191

download  show line numbers  debug dex   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1030298
Snippet name: applyWhileNotNull
Eternal ID of this version: #1030298/1
Text MD5: bbc2de4671f4ea28621af0a66fb870f7
Transpilation MD5: d5e5a63a89fa61081452e5b102e629b5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-28 00:00:34
Source code size: 199 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 22 / 32
Referenced in: [show references]

Formerly at http://tinybrain.de/1030298 & http://1030298.tinybrain.de