<div class="gmail_quote"><div class="gmail_quote">On Mon, Jun 6, 2011 at 4:05 PM, Casey McCann <span dir="ltr">&lt;<a href="mailto:syntaxglitch@gmail.com" target="_blank">syntaxglitch@gmail.com</a>&gt;</span> wrote:</div><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>ArrowChoice and ArrowApply are conceptually distinct and I expect</div>
there are instances of the former that have no possible instance for<br>
the latter. Branching vs. Monad I am much less certain of.<br></blockquote><div><br></div></div><div>For a real-time or embedded DSL, or hardware modeling, you could easily desire &#39;Branching&#39; and limited &#39;Loop&#39; classes while rejecting the full power of Monads.</div>

<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<br></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<div class="im">
<span style="border-collapse: collapse; font-family: arial, sans-serif; ">some type that&#39;s not obviously equivalent to one of these definitions:</span><span style="border-collapse: collapse; font-family: arial, sans-serif; "><br>

</span></div><span style="border-collapse: collapse; font-family: arial, sans-serif; ">  branchMonad mb t f = do { b &lt;- mb; if b then t else f } <br></span><div class="im"><span style="border-collapse: collapse; font-family: arial, sans-serif; ">  branchApplicative = liftA3 (\b t f -&gt; if b then t else f)</span></div>
</blockquote>
<div><br></div><div>Earlier forms of my reactive demand programming model [1] - before I switched to arrows - would qualify. The model has limited side-effects (e.g. power a camera on only when someone is observing it) so we cannot use branchApplicative. The reactivity requires continuously weaving the two branches over time and recombining the results, which is distinct from branchMonad.</div>

<div><br></div><div>[1] <a href="http://awelonblue.wordpress.com/2011/05/21/comparing-frp-to-rdp/" target="_blank">http://awelonblue.wordpress.com/2011/05/21/comparing-frp-to-rdp/</a></div><div><br></div></div>
</div><br>