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

10
LINES

< > BotCompany Repo | #1028936 - too_thinkAndReturnLastObjectOfType

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

Libraryless. Click here for Pure Java version (5951L/38K).

static <A> A nuLike too_thinkAndReturnLastObjectOfType(Class<A> type, TransformersOnObjects too) {
  new Var<A> out;
  too.addTransformer(func(O o) {
    if (isInstance(type, o))
      out.set((A) o);
    null;
  });
  too.think();
  ret out!;
}

Author comment

Began life as a copy of #1028840

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028936
Snippet name: too_thinkAndReturnLastObjectOfType
Eternal ID of this version: #1028936/1
Text MD5: 5867dee55f8edd03c758a8ab38fca302
Transpilation MD5: d6ac1674ae0882449c1c908fec0c6e6c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-12 12:54:39
Source code size: 254 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 5 / 21
Referenced in: [show references]

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