The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.


I found that different chapters are using different JS styles. For instance chapter 7, 8, 9, and 10 use more ES2015 (ES6) style, and chapter 2 - ES5. Are there any plans to update code to one common ES2015 style?

Keep up a good work.

I created an example to run benchmark and using "combining" is faster than using "composing".

You can see an example at

That means that iterator runs every time for each method (filter, map, ...)

The result is

"Took, 1040.8300 milliseconds. Result 166666333333 by using independent filters"
"Took, 551.2400 milliseconds. Result 166666333333 by using combined filters"
Hi Mark,

Thank you for your reply. Indeed it's interesting question and the only way to know how it behaves is to look at source code, or run a test. I might do some benchmark tests to be sure.
So is this going to be O(2n) using multiple filters versus O(n) with combined one filter?

I'm reading first chapter and I really enjoy reading it.

I have a question. Combining vs Composition. In combining looks to me we have only one function that applied to set of items and while loop (page 23) runs only once. However when we have composition of filters (page 24) don't we run two times? First one for

filter (expenses, isLodging)

and second one result of the first filter throu

filter (..., isCash)

which will be translated to:

filter(filter(expenses, isLodging), isCash)

and that means that we will iterate over data two times.

Am I missing something?

Keep up a good work.