Introduction: added missing code and simplified

The code in Introduction to DataflowEx seems to have been truncated.

This commit fixes that and also simplifies the code by using lambdas instead of casts.