3 ms·
You can cheat in haskell as well. You can store the mutable variable in an mvar and then use unsafePerformIO (modifyMVar action) . It's uglier, but on the other
by yummyfajitas 16y ago
You can cheat in haskell as well. You can store the mutable variable in an mvar and then use unsafePerformIO (modifyMVar action) . It's uglier, but on the other hand the unsafeness of it jumps out at you.
- jrockway 16y agoMVars are for sharing data between threads. IORefs are mutable boxes.