3 ms·
They'd mostly be used for creating a pure API around any mutability under the hood But we already had ST for that, so the real advantage of LTs over ST is you
by whateveracct 6y ago
They'd mostly be used for creating a pure API around any mutability under the hood
But we already had ST for that, so the real advantage of LTs over ST is you can type-safely "freeze" and "thaw" your mutable structure without copying.
The mutable array example in the Linear Haskell paper is a simple comparison to what you're asking for.