I have a scenario where i need to accumulate two different sets from the same input:
accumulate (ord : Order(type == A); $aSet : collectSet(ord))
accumulate (ord : Order(type == B); $bSet : collectSet(ord))
Is there a way to accomplish it with only one accumulate? This is a simple example, but in my application there is a lot of mutual conditions in these two accumulates and it seems like it does a lot of extra work by iterating two times on the same data with same conditions.
Performance-wise, it seems i would want to iterate only one time over the records and collect different data to different sets.
Any suggestions?
Thanx.