This article explores different ways to create iterators and iterable values in Javascript for dynamic sequence generation, specifically using functions, iterators, iterables and generators. It provides code examples for implementing the Fibonacci sequence with each approach.
#design-patterns
4 posts
21 Jan 2019
11 Nov 2018
This article explores how to simulate multiple return values in JavaScript using arrays and objects. It covers use cases like React Hooks and async/await error handling. The pattern enables elegant APIs but has performance implications.
31 Jul 2016
The author announces the release of "Node.js design patterns - second edition", a new book covering design patterns for Node.js and JavaScript. It includes updated code for Node v6 and ES2015 across 11 chapters and 100+ examples.
4 Jul 2016
A recent article about various ways to implement structural pattern matching in Java has triggered my interest: http://blog.higher-order.com/blog/2009/08/21/structural-pattern-matching-in-java The article mentions a Scala example where a tree data structure can be traversed very easily and neatly using Scala’s match keyword, along with using algebraic data types (more specifically, a sum type): Even if you’re not … Continue reading How Functional…