Do Immutable.js or Lazy.js perform short-cut fusion?
I’m the author of Immutable.js (and a fan of Lazy.js). Does Lazy.js and Immutable.js’s Seq use short-cut fusion? No, not exactly. But they do remove intermediate representation of operation results. Short-cut fusion is a code compilation/transpilation technique. Your example is a good one: var a = [1,2,3,4,5].map(square).map(increment); Transpiled: var a = [1,2,3,4,5].map(compose(square, increment)); Lazy.js and … Read more