
Functional Programming with Ian Schwartz - JSJ 574
JavaScript Jabber
JavaScript, Promises and Monads
AJ: A promise is a data type. That has at its core a something that it's holding within it, rep conceptually, not necessarily literally. In the case of an array, it's a misappential list of things in the case of a promise. It's in a synchronous task that is either in a completed or yet to be completed or error at state of some time. With arrays, you have, you know, map and you also have flat map that automatically flattens it. Flat map is the method that makes an array and JavaScript a monad. If you can take something and supply a map method that has a callback that exposes the inner value and then
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.