-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
(pointfree) chain: Chain f => (a -> f a) -> f a -> f a #178
Comments
chain
I agree that this is a great idea! Ramda provides I don't think the implementation is quite as simple as @svozza has been working on a I believe the correct signature is: chain :: Chain m => (a -> m b) -> m a -> m b |
Oh yes you're right of course about the signature. The implementation I suggested works for Chains in Sanctuary; and as for Arrays, the Ramda function is available. However, I read in #142 that you aim to lose that dependency in the future, in which case I agree |
To clarify the relationship between Ramda and Sanctuary, Sanctuary is currently complementary to Ramda. At some point, though, Sanctuary will be an alternative to Ramda, providing much of the same functionality but with a different approach to handling type errors. |
I am missing the pointfree
chain
function in this library.I have several functions of signature
Functor f => a -> f a
, which I would like to compose usingpipe
.I have written the following conversion to pointfree of
chain
to allow this.Now I can write
Maybe there is a different intended way of doing this with this library? If not, I think the simple
chain
function would be a good addition.The text was updated successfully, but these errors were encountered: