the intermediate objects are still created, they just aren't given names/saved to a specific memory location somewhere
do you mean like streaming APIs where intermediate data structures aren't created? Is that what javascript does w/map() etc?
do you mean like streaming APIs where intermediate data structures aren't created? Is that what javascript does w/map() etc?
Yeah; this is what the new iterator methods were intended to solve
// This type of usage creates intermediates
array.map().filter()
// But these would not?
array.values().map().filter().toArray()
array.values().reduce()