1 | static L<Map<S, Lisp>> matchConditions_all(L<Lisp> conditions) {
|
2 | ret matchConditions_all(conditions, new HashMap); |
3 | } |
4 | |
5 | static L<Map<S, Lisp>> matchConditions_all(L<Lisp> conditions, Map<S, Lisp> m) {
|
6 | if (empty(conditions)) ret ll(m); |
7 | |
8 | Lisp condition = first(conditions); |
9 | L<Map<S, Lisp>> candidates = matchCondition_all(condition, m); |
10 | if (empty(candidates)) ret candidates; // first condition failed |
11 | |
12 | new LinkedHashSet<Map<S, Lisp>> results; |
13 | for (Map<S, Lisp> m2 : candidates) |
14 | results.addAll(matchConditions_all(dropFirst(conditions), m2)); |
15 | ret asList(results); |
16 | } |
Began life as a copy of #1008124
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: | #1008130 |
| Snippet name: | matchConditions_all |
| Eternal ID of this version: | #1008130/3 |
| Text MD5: | 80f23fb91f1abdeceef3d6e5db1a4e1a |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-14 02:12:30 |
| Source code size: | 602 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 682 / 733 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |