Tag: computer science
-
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…
-
Getting the gist of segment trees

Segment Trees Wow they seem overly complex to learn about. They’re a very easy concept, but there is a paucity of resources for explaining them. Have a gander at the resources at the bottom for the ones I came across. Took me ages to figure out the differences between them. Here, I assume you know…