On Mon, Jan 12, 2009 at 6:34 PM, Phil <span dir="ltr">&lt;<a href="mailto:pbeadling@mail2web.com">pbeadling@mail2web.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-- Monad Implementation<br>
<br>
evolveUnderlying :: (Double, Word64) -&gt; ( (), (Double, Word64) )<br>
evolveUnderlying (stock, state) = ( (), ( newStock, newState ) )<br>
<div class="Ih2E3d"> &nbsp;where<br>
 &nbsp; &nbsp;newState = ranq1Increment state<br>
 &nbsp; &nbsp;newStock = stock * exp ( ( ir - (0.5*(vol*vol)) )*timeStep + (<br>
vol*sqrt(timeStep)*normalFromRngState(state) ) )</div></blockquote><div><br>How about:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">evolveUnderlying :: (Double, Word64) -&gt; (Double, Word64)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">evolveUnderlying (stock, state) = (newStock, newState)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; where ...</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">getEvolution = modify evolveUnderlying</span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span>Luke</div>
</div>