Fork me on GitHub
#clara
<
2017-08-17
>
enn20:08:22

Can an accumulator accumulate across more than one fact type (joined on some field)? All of the examples show only a single fact type in the :from clause.

wparker22:08:32

@enn Strictly speaking no, but with a custom ancestors fn you can create a new type that is the parent of multiple types for whatever fact types you’re working with

wparker22:08:25

Same goes for other condition types as well

wparker22:08:46

e.g. if you have FactTypeA and FactTypeB, you can make FactTypeC a parent of both

wparker22:08:21

then [?facts <- (acc/all) :from [FactTypeC (…)]] would accumulate on both FactTypeA and FactTypeC

enn22:08:20

Interesting.

enn22:08:24

I hadn’t thought of that approach.

wparker22:08:09

Edit: “would accumulate on both FactTypeA and FactTypeB”