That&#39;s why I wrote &quot;don&#39;t be hasty&quot; ;-)<br><br>accumulate is generic right now: You can code the steps explicitly, or you can plug in your own accumulate function. Writing &quot;lower&quot; and &quot;upper&quot; for Comparable (or Date) is a matter of 100 LOC each.<br>
<br>-W<br><br><br><br><div class="gmail_quote">2011/3/25 Greg Barton <span dir="ltr">&lt;<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#FFFFFF"><div>Which is why I prefaced with &quot;if it can work that way...&quot; A JIRA can be for feature requests, and that&#39;s what this would be.  Whether just adding a Comparable based accumulate function is the solution, or making accumulate generic like &quot;from&quot; is now, a JIRA does not have to specify the solution, just the request.<br>
<br>GreG</div><div><br>On Mar 25, 2011, at 4:22, Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>Now don&#39;t be hasty with a JIRA. Using Comparable for the arguments of the min and max accumulate functions will give you a result that is -- Comparable. So:<div class="im">
<br><br>  $min: Comparable() from accumulate( Schedule( $d: date ), min( $d ) )<br>
<br></div>OK, this will give you the minimum data, bound to $min, although it won&#39;t let you write any constraint for the &quot;Comparable&quot; result fact. But, what&#39;s worse, it will not let you write<br><br>  $min: Number( intValue &gt; 100 ) from accumulate( X( $y: y ), min( $y ) )<div class="im">
<br>
<br>any more (unless I&#39;m very much mistaken).<br><br></div>-W<br><br><br><br><div class="gmail_quote"><div class="im">On 25 March 2011 03:56, Greg Barton <span dir="ltr">&lt;<a href="mailto:greg_barton@yahoo.com" target="_blank"></a><a href="mailto:greg_barton@yahoo.com" target="_blank">greg_barton@yahoo.com</a>&gt;</span> wrote:<br>

</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Well, if it can work that way it should.  I&#39;d say open a JIRA and request that feature.  It works with the &quot;principle of least confusion.&quot; :)<br>


<div><br>
--- On Thu, 3/24/11, jkrupka &lt;<a href="mailto:jkrupka@gmail.com" target="_blank"></a><a href="mailto:jkrupka@gmail.com" target="_blank">jkrupka@gmail.com</a>&gt; wrote:<br>
<br>
&gt; From: jkrupka &lt;<a href="mailto:jkrupka@gmail.com" target="_blank"></a><a href="mailto:jkrupka@gmail.com" target="_blank">jkrupka@gmail.com</a>&gt;<br>
</div></div><div class="im">&gt; Subject: Re: [rules-users] accumulate min over java.util.Date<br>
</div><div class="im"><div>&gt; To: <a href="mailto:rules-users@lists.jboss.org" target="_blank"></a><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
</div></div><div class="im">&gt; Date: Thursday, March 24, 2011, 8:26 PM<br>
</div><div><div></div><div><div class="im">&gt; Yea the docs weren&#39;t really clear<br></div><div class="im">
&gt; about it, so I just thought it would work<br></div><div class="im">
&gt; for anything that implemented Comparable =)<br>
&gt;<br></div><div class="im">
&gt; Yep, used the long from getTime() - not the prettiest way<br></div><div class="im">
&gt; of doing it, but<br>
&gt; it works great.<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; --<br></div>
&gt; View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html" target="_blank"></a><a href="http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html</a><div class="im">
<br>

&gt; Sent from the Drools - User mailing list archive at<br>
&gt; <a href="http://Nabble.com" target="_blank">Nabble.com</a>.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org" target="_blank"></a><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

&gt;<br>
<br>
<br>
<br></div><div class="im">
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"></a><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

</div></div></div></blockquote></div><br>
</div></blockquote><div class="im"><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a></span><br>
<span><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></span><br></div></blockquote></div></div><br>_______________________________________________<br>

rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>