-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Cofree.ana and Cofree.anaEval #2325
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2325 +/- ##
==========================================
+ Coverage 95.07% 95.08% +<.01%
==========================================
Files 343 343
Lines 5931 5935 +4
Branches 217 216 -1
==========================================
+ Hits 5639 5643 +4
Misses 292 292
Continue to review full report at Codecov.
|
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.
Looks great!
Looks good to me 👍 About naming, I think |
Seems reasonable to me. I'll unfold |
The build seems to have freaked out-- possibly related to GitHub being down briefly. I don't have permissions to restart it so maybe someone here could? |
done |
Ready to merge @andyscott? :) |
Yes, definitely 🤘 |
Adds
Cofree.ana
(update: addedanaEval
too), which generalizesCofree.unfold
with a fusedmap
. The map fused version is a bit more useful than the basic unfold, especially when you're unfolding from some other messy structure.I stuck with the name from the Haskell category extras package but I suppose
unfoldMap
(ormapUnfold
?) might also be a good name for this.