3 ms·
This seems like a reimplementation of ST using an unspecified State Mem.
by JoshTriplett 12y ago
This seems like a reimplementation of ST using an unspecified State Mem.
- tel 12y agoIt's not yet, but—to cheat a bit here—eventually we're going to use `Mem` to get quite intimate with `ST` and show why it's important to use `ST` perhaps more often than people even anticipate. If you'd like, try to instantiate something along the lines of `Mem (State (IntMap v))`. It's slightly trickier than it looks due to some typing issues (which don't matter, but I'll save the reveal). It's also likely to be slightly buggy.