-
Notifications
You must be signed in to change notification settings - Fork 454
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
Recursion schemes #237
Recursion schemes #237
Conversation
Codecov Report
@@ Coverage Diff @@
## master #237 +/- ##
=========================================
Coverage ? 44.95%
Complexity ? 318
=========================================
Files ? 148
Lines ? 3733
Branches ? 402
=========================================
Hits ? 1678
Misses ? 1934
Partials ? 121
Continue to review full report at Codecov.
|
|
||
init { | ||
testLaws(FunctorLaws.laws(ComposedFunctor(Option.functor(), NonEmptyList.functor()), cf, EQ_OPTION_NEL)) | ||
testLaws(FunctorFilterLaws.laws(ComposedFunctorFilter(OptionT.functorFilter(Id.monad()), OptionT.functorFilter(NonEmptyList.monad())), { OptionT.pure(OptionT.pure(it, NonEmptyList.monad()), Id.monad()).lift() }, EQ_OPTIONT_ID_NEL)) | ||
testLaws(FunctorFilterLaws.laws(ComposedFunctorFilter(OptionT.functorFilter(Id.monad()), OptionT.functorFilter(NonEmptyList.monad())), { OptionT.pure(OptionT.pure(it, NonEmptyList.monad()), Id.monad()).nest() }, EQ_OPTIONT_ID_NEL)) |
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.
Should ComposedFunctorFilter
be renamed to NestedFunctorFilter
? Same for others that were previously under the Composed* names.
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.
This is m,ind blowing, never imagined we'd be able to encode recursion schemes in Kotlin. I think it would be helpful to include examples and for all these new features they should come with some documentation as well.
…on/Katz into paco-recursionschemes
…ating time to see if it prevents flakyness (#237)
* Added a resolve function to Either. * Processed some review comments. * Added docs for catch and resolve functions. * Improved docs for the resolve function. * Inlined catch and resolve functions. * Changed the implementation of the resolve function to not use default values for function parameters so that all function parameters can be inlined. * Changed the handleItSafely function into catchAndFlatten. * Made small improvement to tests.
Magic. MAGIC. MAAAAGIIIIC.