Returning inner lambdas from outer lambdas