Libraryless. Click here for Pure Java version (3984L/24K).
1 | static Set<S> applyAttractors(L<? extends Attractor> rules, S s) {
|
2 | ret concatListsToCISet(map(rules, rule -> |
3 | rule.matches(s) ? getStringEmits(rule) : null |
4 | ); |
5 | } |
6 | |
7 | static Set<S> applyAttractors(L<? extends Attractor> rules, Collection<S> inputs, O... _) {
|
8 | Set<S> out = cloneLinkedCISet(inputs); |
9 | for unnull (S input : inputs) |
10 | functionReturningList_transitiveHull_ciSet(func(S s) -> Collection<S> { applyAttractors(rules, s) }, input, optPar seen(_, out));
|
11 | ret out; |
12 | } |
Began life as a copy of #1023191
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023772 |
| Snippet name: | applyAttractors |
| Eternal ID of this version: | #1023772/2 |
| Text MD5: | 00f0ffab4ee6dbfa6e7983fefb285826 |
| Transpilation MD5: | cb99d4446153cad43c795b85913de0d6 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-07-08 22:39:10 |
| Source code size: | 493 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 415 / 549 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |