8-14, python cookbook and cpp lambda function