3 ms·
If we really need to we can just actually use arrays tho: https://hackage.haskell.org/package/primitive-0.7.4.0/docs/Data-Primitive-ByteArray.html#v:ByteArray
by poorlyknit 4y ago
If we really need to we can just actually use arrays tho:
https://hackage.haskell.org/package/primitive-0.7.4.0/docs/Data-Primitive-ByteArray.html#v:ByteArray https://hackage.haskell.org/package/primitive-0.7.4.0/docs/D...
That's what I meant: You can mostly use tree-like log(n) data structures rather nicely but you'll have to isolate your mutating code into stuff like PrimMonad, see:
https://hackage.haskell.org/package/primitive-0.7.4.0/docs/Data-Primitive-ByteArray.html#v:writeByteArray https://hackage.haskell.org/package/primitive-0.7.4.0/docs/D...
I like Haskell because it lets me write clean interfaces at a high level but fall back to byte-level stuff when needed.