Book hoarder, fast reader, slow writer & big time talker. Also, Scala & Functional Programming enthusiast: https://www.linkedin.com/in/aarsh-shah-900757aa/
Only 137 likes, something was wrong. Every post before that had atleast 300. Maybe it was the hair. It was a bad hair day. Naah, the hair was right, her photo the day before had the same hair and it managed 277. The dress was different in that, light pink , and pink meant women for men and maybe that worked…
If you look at the code for collections in the standard library, you’ll see that each collection inherits from some specific function type. By laws of subtyping, this means that a collection can be used wherever the function type it inherits from is required…
Type classes allow us to push the limits of extensibility of our types. It is an elegant way of adding new behaviours to existing types without changing the implementation of the type itself. Let’s dive straight to the code. We will use the Scala REPL for all our examples
Memoization is an optimization technique of caching the output of an expensive function for a particular input and then returning the cached result if the function is called again with the same input parameters. Think of it as a lazy…
Of late, I’ve been dealing with problems related to accumulating errors from multiple futures. Combinators like map, flatmap, sequence and traverse have a fail-fast behaviour. While composing or sequencing multiple Futures, they return the first…