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

Delay, Combine. #48

Open
gusty opened this issue Oct 13, 2015 · 2 comments
Open

Delay, Combine. #48

gusty opened this issue Oct 13, 2015 · 2 comments

Comments

@gusty
Copy link
Owner

gusty commented Oct 13, 2015

It would be nice to allow other applications to create generic workflows. Currently a simple monad workflow is possible but in F# there are more operations available, some of them depends on the type, like Delay and Combine. So it worths exploring the possibility of adding Delay, Combine as method-classes and see what comes up.
There is some potential inspiration here.

@gusty
Copy link
Owner Author

gusty commented Dec 11, 2016

This was implemented here.
But note that the default definition uses the lazy signature let delay x = x() even for non-lazy monads like list or array which in theory should be defined as let delay x = x.
By doing this we don't need to specify a special run for strict monads.
At the moment I don't see a problem with this.

@gusty
Copy link
Owner Author

gusty commented Jan 7, 2017

After the merge with FSharpPlus this issue will be tracked here.

And now I see a problem with the always-delayed approach, see the code example there.

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

No branches or pull requests

1 participant