Replace lambda by function to show advantages of macro