Exploring Monads in JavaScript for File Handling
Too Long; Didn't Read
A monad is an abstraction over a chain of related computations. A container that takes the current state and a function that takes that state as an argument and returns the new state. Sounds hard? Not yet… 🙃 This container encapsulates the environment (context) for performing calculations, taking into account possible exceptions. The output is only the expected values. In general, just a “monoid in the category of endofunctors” (c). I hope now it’s clear 🧌