2 ms·
That's more or less how I think of it. Each bind/flatMap introduces a new value into scope and can consume data in the form of the result of a further bind/flat
by acjohnson55 4y ago
That's more or less how I think of it. Each bind/flatMap introduces a new value into scope and can consume data in the form of the result of a further bind/flatMap or final return.
It's essentially a mini interpreter for tiny functionally pure segments of a program.
One tricky part of the interpretation is understanding the most familiar monadic data types in this paradigm. For example, the list monad representing discrete nondeterminism.
Writing about this so tersely is probably only going to confuse anyone who isn't already 90% of the way to understanding....