6 ms·
> Consistent with my loyalty to the functional-programming idiom, I designed my initial bf implementation so that each instruction would copy the existin
by danidiaz 4y ago
> Consistent with my loyalty to the functional-programming idiom, I designed my initial bf implementation so that each instruction would copy the existing bytes into a new array, change the byte of interest, return this new byte array, and abandon the old array (which would eventually be garbage-collected).
This would be a fun task to attempt with the new linear features of Haskell https://hackage.haskell.org/package/linear-base-0.1.0/docs/Data-Vector-Mutable-Linear.html https://hackage.haskell.org/package/linear-base-0.1.0/docs/D...