Thanks so much for your help. I should have made clear that I was aware
that the definitions were mutually dependent.  What I was hoping
was that Haskell could solve this for me without my having to resort to
effectively finessing any sequencing considerations.<br>
<br>
Perhaps I am really asking it to do too much.<br>
<br>
This I thought might be reasonable since one is supposed to be
achieving a sequence-less style of programming.&nbsp; But this would
seem to be a counter example where&nbsp; I will be essentially forced
to implement a sequential processing semantic in a language environment
which ostensibly would deny me such (for my own good I understand).<br>
<br>
Thoughts?<br>
<br><br><div><span class="gmail_quote">On 4/6/06, <b class="gmail_sendername">Garrett Mitchener</b> &lt;<a href="mailto:garrett.mitchener@gmail.com">garrett.mitchener@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">I came up with a system of coloring --
you'll have to view this message as html to see it.&nbsp; You start
with the input parameters -- those are green.&nbsp; Anything defined in
terms of green is blue.&nbsp; Anything defined in terms of green &amp;
blue is purple.&nbsp; Anything defined in terms of green, blue, and
purple is orange, etc.&nbsp; Then you can see the problem.&nbsp; So in
foo, everything checks out, you get to orange and there's just a couple
of expressions left and you can see that there's no loop.
<br><div></div><div style="direction: ltr;"><span class="q"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;"><div style="direction: ltr;">
<div><pre>-----------------------------------------------------------------------------------------------------------<br><br><br> foo  <span style="color: rgb(51, 204, 0);">(</span><span style="background-color: rgb(255, 255, 255); color: rgb(51, 204, 0);">
step,r0,mu0</span><span style="color: rgb(51, 204, 0);">)</span> = bar (<span style="color: rgb(51, 204, 0);"><br>step</span>,r1,<span style="color: rgb(51, 204, 0);">r0</span>,mu1,<span style="color: rgb(51, 204, 0);">mu0
</span>)<br>    where<br>    r1 = <span style="color: rgb(51, 204, 0);">r0</span>-<span style="color: rgb(51, 204, 0);"><br>step</span>*<span style="color: rgb(255, 204, 51);">rd</span><br>    mu1 = <span style="color: rgb(51, 204, 0);">
mu0</span>-<span style="color: rgb(51, 204, 0);">step</span>*<span style="color: rgb(255, 204, 51);">mud</span>
<br><br>    <span style="color: rgb(255, 204, 51);">rd</span> = <span style="color: rgb(204, 51, 204);">c*c</span>*<span style="color: rgb(51, 204, 0);">mu0</span><br>    <span style="color: rgb(255, 204, 51);">mud</span>
<br> = <span style="color: rgb(204, 51, 204);">c*c</span>/<span style="color: rgb(51, 204, 0);">r0</span> - (foobar_r <span style="color: rgb(51, 102, 255);">z</span>)/<span style="color: rgb(204, 51, 204);">c</span><br>    
<span style="color: rgb(204, 51, 204);"><br>c</span> = baz(<span style="color: rgb(51, 102, 255);">z</span>)<br>    <span style="color: rgb(51, 102, 255);">z</span> = 6.378388e6-<span style="color: rgb(51, 204, 0);">r0</span>
<br><br>baz z | z&lt;125 = -0.25*z+1537.5<br><br>        | otherwise = 0.0169*z+1504.1<br><br>foobar_r z | z&lt;125 = 0.25<br><br>    | otherwise = -0.0169</pre></div></div></div></blockquote></span></div><div style="direction: ltr;">
<div><br>But
when you try coloring bar, you get this far and then we're stuck.&nbsp;
The problem is clear: r depends on rdc, which depends on rd0, which
depends on c0, which depends on z0, which depends on r.&nbsp; So your
definition for r includes a loop.
<br></div></div><div style="direction: ltr;"><span class="e" id="q_10a6f8008178aa30_3"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;"><div style="direction: ltr;"><div><pre>bar <span style="color: rgb(51, 204, 0);"><br>(step,r2,r1,mu2,mu1)</span> = (r,z0) : bar (<span style="color: rgb(51, 204, 0);">step,r1</span>,r,<span style="color: rgb(51, 204, 0);">
mu1</span>,m)<br>    where<br>    r = <span style="color: rgb(51, 204, 0);">r2</span><br>+2*<span style="color: rgb(51, 204, 0);">step</span>*rdc<br>    m = <span style="color: rgb(51, 204, 0);">mu2</span>+2*<span style="color: rgb(51, 204, 0);">
step</span>*mudc<br>    rdc = (<span style="color: rgb(255, 204, 51);"><br>rd2+rd1</span>+rd0)/6<br>    mudc = (<span style="color: rgb(255, 204, 51);">mud2+mud1</span>+mud0)/6<br><br><br>    <span style="color: rgb(255, 204, 51);">
rd2</span> = <span style="color: rgb(204, 51, 204);">c2*c2</span>*<span style="color: rgb(51, 204, 0);">mu2</span><br>    <span style="color: rgb(255, 204, 51);">mud2</span><br> = <span style="color: rgb(204, 51, 204);">c2*c2
</span>/<span style="color: rgb(51, 204, 0);">r2</span> - (foobar_r <span style="color: rgb(51, 102, 255);">z2</span>)/<span style="color: rgb(204, 51, 204);">c2</span><br><br><br>    <span style="color: rgb(255, 204, 51);">
rd1</span> = <span style="color: rgb(204, 51, 204);">c1*c1</span>*<span style="color: rgb(51, 204, 0);">mu1</span><br>    <span style="color: rgb(255, 204, 51);">mud1</span> = <span style="color: rgb(204, 51, 204);"><br>c1*c1
</span>/<span style="color: rgb(51, 204, 0);">r1</span> - (foobar_r <span style="color: rgb(51, 102, 255);">z1</span>)/<span style="color: rgb(204, 51, 204);">c1</span><br><br>    rd0 = c0*c0*m<br><span></span>    mud0 = c0*c0/r - (foobar_r z0)/c0
<br><br><br>    <span style="color: rgb(204, 51, 204);">c2</span> = baz(<span style="color: rgb(51, 102, 255);">z2</span>)<br><br>    <span style="color: rgb(204, 51, 204);">c1</span> = baz(<span style="color: rgb(51, 102, 255);">
<br>z1</span>)<br>    c0 = baz(z0)<br><br>    <span style="color: rgb(51, 102, 255);">z2</span> = 6.378388e6-<span style="color: rgb(51, 204, 0);">r2</span><br>    <span style="color: rgb(51, 102, 255);">z1</span> = 6.378388e6
<br>-<span style="color: rgb(51, 204, 0);">r1</span><br>    z0 = 6.378388e6-r<br><br>main :: IO ()<br>main = do<br>    print $ take 100 (foo (0.1, 6.378388e6,0))</pre>
<br>
&nbsp;</div><br></div><br>

</div></blockquote></span></div><div style="direction: ltr;"></div><br>

</div></blockquote></div><br>