use reduce instead of for-loop for generated 'each' code
use reduce instead of for-loop for generated 'each' code

most importantly to close over value/index at each iteration.
will have to think of a way to unit-test this appropriately.

jonathanong/virtual-jade