Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Conuations Monad based on Control.Monad.Cont #54

Closed
wants to merge 14 commits into from

Conversation

corruptmemory
Copy link

I've cobbled together a continuations monad based on Control.Monad.Cont. Would love to share and/or get some feedback on it. It's still a bit of a work in progress, but most of the basics are in place.

@runarorama
Copy link
Member

While this is a good exercise, the Cont monad is not very useful in Scala since none of the tail calls are eliminated. It is isomorphic to Free[Id], or Free[Function0], or scalaz.Trampoline, which does optimize tail calls.

@runarorama runarorama closed this Feb 26, 2012
@corruptmemory
Copy link
Author

Good points, thanks. Yeah, the tail call problem is a PITA. Trampoline is the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants