Skip to content
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

Missing folds for ByteArray #328

Open
konsumlamm opened this issue Dec 23, 2021 · 1 comment
Open

Missing folds for ByteArray #328

konsumlamm opened this issue Dec 23, 2021 · 1 comment

Comments

@konsumlamm
Copy link
Contributor

Data.Primitive.ByteArray currently only provides foldrByteArray. Meanwhile Data.Primitive.PrimArray provides foldrPrimArray, foldrPrimArray', foldlPrimArray and foldlPrimArray'. So it seems `Data.Primitive.ByteArray is missing:

  • foldrByteArray'
  • foldlByteArray
  • foldlByteArray'

However, foldrByteArray interprets the elements as Prim a => a values, so it may be questionable if folds over ByteArrays should really be provided, rather than just recommending to just use PrimArray.

@andrewthad
Copy link
Collaborator

For the sake of symmetry, I would accept these, since it cannot hurt to have them. But you're right that using PrimArray is preferred.

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

No branches or pull requests

2 participants