haskell / haskell/primitive

Missing folds for `ByteArray`

Open
#328 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
123
Forks
60
PR merge metrics
No merged PRs in 30d

Description

`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 `ByteArray`s should really be provided, rather than just recommending to just use `PrimArray`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.