1 | static Triple<L<S>> attractToTwoLists1(L<S> things, L<S> l1, L<S> l2) { |
2 | Set<S> set1 = asCISet(l1), set2 = asCISet(l2); |
3 | new L<S> a; new L<S> b; new L<S> undecided; |
4 | for (S s : unnull(things)) { |
5 | L<S> pot = doubleBoolSwitch( |
6 | contains(set1, s), a, |
7 | contains(set2, s), b, |
8 | undecided); |
9 | pot.add(s); |
10 | } |
11 | ret triple(undecided, a, b); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014622 |
Snippet name: | attractToTwoLists1 |
Eternal ID of this version: | #1014622/2 |
Text MD5: | b49ba36cfc202c85c39bbfa621934435 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-27 01:03:34 |
Source code size: | 368 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 329 / 382 |
Version history: | 1 change(s) |
Referenced in: | [show references] |