paint-brush
Exploring Monads in JavaScript for File Handlingby@maksimmuravev
6,891 reads
6,891 reads

Exploring Monads in JavaScript for File Handling

by Maksim Muravev7mApril 18th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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 🧌
featured image - Exploring Monads in JavaScript for File Handling
Maksim Muravev HackerNoon profile picture
Maksim Muravev

Maksim Muravev

@maksimmuravev

DevOps Engineer.

0-item

STORY’S CREDIBILITY

Code License

Code License

The code in this story is for educational purposes. The readers are solely responsible for whatever they build with it.

L O A D I N G
. . . comments & more!

About Author

Maksim Muravev HackerNoon profile picture
Maksim Muravev@maksimmuravev
DevOps Engineer.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite