Cactus
Cactus

Reputation: 27636

Byte array (byte string) data structure with persistent, pure interface

I'm looking for a data structure that stores bytes, allows constant-time pure indexing, and presents a pure, persistent interface for updating. Basically, I'm looking for Idris's equivalent of Haskell (strict) bytestrings.

Data.ByteArray provides a mutable byte array that is accessible from IO only; and it builds Data.Bytes on top of that which at first glance seems promising; however, it doesn't seem to have an indexing operation, and updating seems to only be possible by splitting and re-concatenating.

Upvotes: 4

Views: 277

Answers (0)

Related Questions