Monads in Typescript
A nice, in depth article about how Monads can be implemented and used in typescript.
https://medium.com/flock-community/monads-simplified-with-generators-in-typescript-part-1-33486bf9d887
Medium
Monads simplified with Generators in TypeScript: Part 1
Async functions solve callback hell for the Promise “monad”. Generators solve this for any Monad in TypeScript.
5 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
they don't say "you can turn Arrays" in monads, but "Arrays are already monads" (lists and optionals are not a thing in JS/TS)
and for the generator thing... I don't understand it either
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
they already are monads tho (with implicit getters, but still)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View