<div dir="ltr"><div>Hey Isaac,</div><div>thats certainly an interesting approach, it seems like that solves it by reframing the question as "can you implement a loop/trampoline in the monad". It would be even cooler to have an approach that does proper tail calls i think .. <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 26, 2022 at 8:15 PM Isaac Elliott <<a href="mailto:isaace71295@gmail.com">isaace71295@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><a href="https://pursuit.purescript.org/packages/purescript-tailrec/6.1.0/docs/Control.Monad.Rec.Class" target="_blank">https://pursuit.purescript.org/packages/purescript-tailrec/6.1.0/docs/Control.Monad.Rec.Class</a> seems like a good starting point</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 27 Sept 2022, 6:39 am Carter Schonwald, <<a href="mailto:carter.schonwald@gmail.com" target="_blank">carter.schonwald@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello everyone!<div>a recent conversation I has having led to an interesting question: is there a good interface or something for Monads which guarantee tail calls are tail calls? (ideally via a stronger api assumption for tail position computations in a monad rather than "trustme" style api contracts)</div><div><br></div><div>thx </div><div>-Carter</div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
</blockquote></div>