You could read:<div><div><br></div><div><a href="http://www.cs.nott.ac.uk/~nhn/FoPAD2007/Talks/nhn-FoPAD2007.pdf">http://www.cs.nott.ac.uk/~nhn/FoPAD2007/Talks/nhn-FoPAD2007.pdf</a></div><div><a href="http://haskell.cs.yale.edu/yale/papers/haskell-workshop03/yampa-arcade.pdf">http://haskell.cs.yale.edu/yale/papers/haskell-workshop03/yampa-arcade.pdf</a></div>
<div><a href="http://www.cs.nott.ac.uk/~nhn/Talks/HW2002-FRPContinued.pdf">http://www.cs.nott.ac.uk/~nhn/Talks/HW2002-FRPContinued.pdf</a></div><div><a href="http://www.haskell.org/yale/papers/haskellworkshop02/index.html">http://www.haskell.org/yale/papers/haskellworkshop02/index.html</a></div>
<div><a href="http://www.haskell.org/haskellwiki/Frag">http://www.haskell.org/haskellwiki/Frag</a></div><div><br></div><div>Basically, even in an imperative solution, if you have complex dependencies between objects at the same time T, then my experience tells me your into trouble, it&#39;s better to make all objects at time T depend on the state of other objects at time T-dT. If you absolutely need to know at time T what the state of another  object is at time T, the network of dependencies needs to be rearranged dynamically, and you might get different results (or endless loops if you do it badly) in the case of mutual dependencies. This is what Elerea does.</div>
<div><br></div><div><div class="gmail_quote">On Wed, Aug 19, 2009 at 12:40 AM, Eric Wong <span dir="ltr">&lt;<a href="mailto:wsysdu@gmail.com">wsysdu@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I used to think about a physical engine in a similar way, and I think it<br>
can work. But in some simulations that objects have lots of dependencies<br>
on others can be tricky. For instance, object o1 depends on o2, if we<br>
represent them in pure values, when we update o2, then o1 must be<br>
updated with a new o2 value, isn&#39;t it?<br>
<br>
Recently I want to implement the digital circuit simulation in SICP using<br>
Haskell as an exercise. In the Scheme version, each Wire is represented<br>
as a function with local states. It records the signal on the wire and<br>
actions it will take when the signal changes to activate other wires.<br>
How to represent the Wire in haskell purely?<br>
<br>
If I use State Monad (yes, it&#39;s pure :) to repsent a wire with local state,<br>
the interaction between connected wires is really tricky to implement.<br>
any ideas?<br>
<br>
thanks.<br>
<font color="#888888">Eric<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div></div>