|
|
|
|
|
by goto11
1468 days ago
|
|
This describes some monads but not others. IO and State can be thought of as environments supporting effects, but it doesn't really make sense to think of a List like that. The problem with many monad explanations is they only explain particular monads but then other monads become even more confusing. |
|
So it's a little different from thinking of your program as something that is once. Instead, you have your program being run multiple times, with the environment injecting different at each stage.
I think the Future/Promise monad is similar. The environment is taking responsibility for pausing and resuming computation.
But I'm curious if you have other monads in mind where the analogy fails.