-
Notifications
You must be signed in to change notification settings - Fork 448
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
Restore curried and uncurried with arities over 5 #2360
Restore curried and uncurried with arities over 5 #2360
Conversation
You missed the uncurried suspend version for 22 parameters by the way :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnowak thank you for your contribution!
Streamlining Arrow towards 1.0.0 was a really difficult task, so we decided to reduce the arbitrary arity-22 to arity-5, but that was perhaps a bit too harsh.
We should move these tests back, and then I think it looks good to merge 👍
arrow/arrow-libs/core/arrow-syntax/src/test/kotlin/arrow/syntax/test/FunctionSyntaxTest.kt
Line 90 in 9d16994
"testCurrying" { |
@nomisRev I have not found any tests that were not moved from 0.11.0 and covered |
@kyay10
But then I get a compilation error:
I do not know why it happens but the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dnowak,
I guess we only had arity-21 for uncurriedEffect
due to a bug in the Kotlin commpiler :/
arrow/arrow-libs/core/arrow-syntax/src/test/kotlin/arrow/syntax/test/FunctionSyntaxTest.kt
Line 90 in 9d16994
"testCurrying" { |
Thank you for the contribution @dnowak!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dnowak !
Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
Restore the
curried
anduncurried
extension functions with arities higher than 5.There are cases in which arrow users may need the ability to
curry
oruncurry
functions with arities higher than 5.Arrow should guide its users not enforce them. Function with more than 5 arguments may be a valid solution depending on the context.
Limiting the support of the partial application by currying and uncurrying is arbitrary.