Re:Functors, Applicatives, and Monads in Pictures (2013)
by endgame on Wednesday September 23, 2015 @07:04PM
(#10268867)
I'd say STM (software transactional memory) is a compelling example. Your computations that mess with shared variables can only mess with shared variables, the type system enforces this, and the only way you can actually run your shared-memory-changing transaction is through a function `atomically :: STM a -> IO a` (this gives a nice effect: `atomically $ do ...`)
[ Parent
| on HN ]
There are no comments on this comment yet.