On 16/05/2012, Vincent LEGENDRE <vincent.legendre(a)eurodecision.com> wrote:
>
> accumulate( Whatever(...), $count: count(1), ... )
> eval( $count == X )
strange construction ...
"$count: count(1)" is part of the pattern ? then automatically incremented
in $count variable ?
Does the accumulate still return a List or something else ?
If you want to have a list, you can have it in addition to count:
accumulate( $w: Whatever(...) from window:length( 10 ),
$count: count(1), $list: collectList( $w ),... )
although that would be redundant. But if you'd just need the (for
instance) sum, it would be useful.
accumulate( Whatever( $x:x, ... ) from window:length( 10 ),
$count: count(1), $sum: sum( $x ) )
Note that this is a *complete* CE, beginning with "accumulate".
-W
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users