make catsMatch dry
This commit is contained in:
@@ -83,14 +83,17 @@
|
|||||||
(collect (t.keys)))
|
(collect (t.keys)))
|
||||||
[]))
|
[]))
|
||||||
|
|
||||||
|
(function :Array<String> componentList [:nat.Entry e]
|
||||||
|
(for =>cType cId e.components cType))
|
||||||
|
|
||||||
(function tagsMatch [e tagsBoolExp]
|
(function tagsMatch [e tagsBoolExp]
|
||||||
(BoolExpInterp.eval tagsBoolExp (tagList e)))
|
(BoolExpInterp.eval tagsBoolExp (tagList e)))
|
||||||
|
|
||||||
(function componentsMatch [:nat.Entry e componentsBoolExp]
|
(function componentsMatch [:nat.Entry e componentsBoolExp]
|
||||||
(BoolExpInterp.eval componentsBoolExp (for =>cType cId e.components cType)))
|
(BoolExpInterp.eval componentsBoolExp (componentList e)))
|
||||||
|
|
||||||
(function componentsAndTagsMatch [:nat.Entry e componentsAndTagsBoolExp]
|
(function componentsAndTagsMatch [:nat.Entry e componentsAndTagsBoolExp]
|
||||||
(BoolExpInterp.eval componentsAndTagsBoolExp (cast (concat (tagList e) (for =>cType cId e.components cType)))))
|
(BoolExpInterp.eval componentsAndTagsBoolExp (cast (concat (tagList e) (componentList e)))))
|
||||||
|
|
||||||
(defAlias &call catsMatch componentsAndTagsMatch)
|
(defAlias &call catsMatch componentsAndTagsMatch)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user