<div dir="ltr">I just tried something<div><br></div><div><br></div><div><br></div><div>evalRules :: [Rule] -> Step -> [Double]</div><div>evalRules rules step = catMaybes . takeWhile isJust . map (flip evalRule step) $ rules</div><div><br></div><div>This seems to work according to my testing.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 1:32 PM, Imants Cekusins <span dir="ltr"><<a href="mailto:imantc@gmail.com" target="_blank">imantc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><span style="font-size:14px">> short-circuits the computation if it hits Nothing. However, unlike the way the Maybe monad works, I want to know the partial results.</span><br>​</span><div>could store partial results in a State monad.. Maybe would short circuit but the values would stay in the State.</div><div><br></div><div>would this work?</div></div>
<br>______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>