Tag: monads
-
Yet another monad explanation

Photo credit: cheers @laimagendelmundo tl;dr Here’s a really short explanation for JavaScript, as in just the flatmap part. map is pretty well understood in JavaScript (and I’m assuming you understand it). So you ‘just’ need to make the leap to flatmap. Which is mapping something and flattening the result. Flattening a JavaScript array is concatenating…