Move lambda back inside function.

Signed-off-by: Peter Atashian <retep998@gmail.com>