I think the problem in this case is the infamous recursive integral one... Position of the ball depends on the velocity and vice versa. I&#39;m not sure if it is possible to do right now with Reactive. That&#39;s why pong is still number one on my list of test cases for any reactive library :-) Or actually a breakout game is even better, since it involves dynamic collections.<div>
<div><br><br><div class="gmail_quote">On Wed, Mar 4, 2009 at 9:39 PM, Patai Gergely <span dir="ltr">&lt;<a href="mailto:patai_gergely@fastmail.fm">patai_gergely@fastmail.fm</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; I would model this as the position being the integral of the ball&#39;s<br>
&gt; velocity, and switch the velocity, this way, you don&#39;t need to do<br>
&gt; complicated things with trying to grab the position from the last<br>
&gt; section of the behavior.<br>
</div>I tried that too, but the result was the same. I don&#39;t see how that<br>
would help anyway, since integral is just a stepper over an accumE. I<br>
even tried a function-valued behaviour that had to be supplied time<br>
explicitly, which did move at least, but still &lt;&lt;loop&gt;&gt;-ed, so it never<br>
switched.<br>
<div class="im"><br>
&gt; Re delayed switching, Reactive already has a kind of delayed<br>
&gt; switching, that happens automatically when necessary.  If you attempt<br>
&gt; to take the value of a Reactive value at the exact moment of a switch,<br>
&gt; you will receive the value from the previous step.<br>
</div>Oh yes, now I went back to the &#39;Simply efficient...&#39; paper, and it says<br>
so indeed. I just misunderstood that part (off by one thinking, as<br>
always ;). However, the problem still remains, because it&#39;s not only the<br>
new value that depends on the current one but the time of switching as<br>
well. This knot is apparently too tight for the time being.<br>
<br>
Gergely<br>
<font color="#888888"><br>
--<br>
<a href="http://www.fastmail.fm" target="_blank">http://www.fastmail.fm</a> - The professional email service<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Reactive mailing list<br>
<a href="mailto:Reactive@haskell.org">Reactive@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/reactive" target="_blank">http://www.haskell.org/mailman/listinfo/reactive</a><br>
</div></div></blockquote></div><br></div></div>