Skip to content

Conversation

@postsolar
Copy link
Contributor

Description of the change

This PR adds Foldable f ⇒ FoldableWithIndex Int (Cofree f) and Traversable f ⇒ TraversableWithIndex (Cofree f) to Data.Comonad.Cofree. Indexing is "depth-based" and start at 0, the same way as it currently is for the respective Functor f ⇒ FunctorWithIndex Int (Cofree f). I tested each function in the REPL, but if necessary I will add some tests too to the PR.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@mikesol
Copy link

mikesol commented Sep 4, 2023

Good stuff! LGTM.

@garyb garyb merged commit 20e5cd9 into purescript:master Sep 5, 2023
@garyb
Copy link
Member

garyb commented Sep 5, 2023

Oops, this didn't have a changelog update so I'll add that.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants