Libraryless. Click here for Pure Java version (2541L/16K).
1 | // meta-transform function that understands Transformable and List |
2 | // if f returns null, go through structure |
3 | sO lambdaMapLike transform_understandsTransformableAndList_keepUnknown(IF1 f, O o) { |
4 | if (o == null) null; |
5 | ping(); |
6 | try object f.get(o); |
7 | |
8 | IF1 myself = x -> transform_understandsTransformableAndList_keepUnknown(f, x); |
9 | if (o cast Transformable) |
10 | ret o.transformUsing(myself); |
11 | if (o cast L) |
12 | ret map(myself, o); |
13 | |
14 | ret o; |
15 | } |
Began life as a copy of #1027750
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027751 |
Snippet name: | transform_understandsTransformableAndList_keepUnknown |
Eternal ID of this version: | #1027751/1 |
Text MD5: | c5f09412e07262523c86c423690729c2 |
Transpilation MD5: | fc02bb3b1d97ed033ad45d582fb92e34 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-10 00:01:30 |
Source code size: | 466 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 189 / 267 |
Referenced in: | [show references] |