Libraryless. Click here for Pure Java version (3313L/21K).
1 | static <A extends IF0<Either<Iterable<A>, B>>, B> JTree jDynamicEitherTree(A root, O... _) { |
2 | ret jDynamicTree( |
3 | (Either<A, B>) (Either) eitherA(root), |
4 | x -> { |
5 | if (!isEitherA(x)) null; // leaves have no children |
6 | Either<Iterable<A>, B> result = eitherAOpt(x)!; |
7 | ret (Cl<Either<A, B>>) |
8 | (isEitherA(result) ? map eitherA(eitherGetA(result)) : ll(eitherBOpt(result))); |
9 | }, _); |
10 | } |
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: | #1028160 |
Snippet name: | jDynamicEitherTree |
Eternal ID of this version: | #1028160/2 |
Text MD5: | 6b8d204344da05432d49526a7e8172a0 |
Transpilation MD5: | 3b44ed3944973596c43b5b589a111895 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-05-23 22:17:15 |
Source code size: | 417 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 185 / 271 |
Version history: | 1 change(s) |
Referenced in: | [show references] |