3 Ways to start using promises


Continuing from the previous post; lets dive into ways of using promises. First, some helper functions: 1. Pseudo-Observers This involves attaching several handlers to a single promise; all attached handlers are invoked once the promise resolves. I call this the 'pseudo-observer' pattern because each 'observer' gets invoked once (remember promises never leave their resolution state). This explains why promises can't … Continue reading 3 Ways to start using promises

SICP Section 1.3 : Thoughts and Concepts


This section exposed me to the full power and beauty of functional programming. The expressiveness of using functions as values is awesome. For example, a sum of cubes function can use a sum function which itself relies on a reduce function. Think of higher order differentiation in mathematics and you do get the idea. An interesting concept involves … Continue reading SICP Section 1.3 : Thoughts and Concepts