3 ms·
it's the only thing you can use if you want to write imperative style within pure FP. Obviously a simple example like that makes no difference, but with a giant
by proc0 9y ago
it's the only thing you can use if you want to write imperative style within pure FP. Obviously a simple example like that makes no difference, but with a giant app, if you eliminate mutations you get many benefits, and in such apps, sometimes you want to express things imperative, but still not mutate. So in other words, Monads are obviously useful, because the first assumption is that mutation is the root of most bugs, so you eliminate it but still use Monads to emulate it.