1. ConcatMap is basically the same function as flatMap().  I generalized flatMap() and got rid of concatMap().
2. Use forEachImpl() everywhere to avoid the virtual function call.