removing return in a lambda statement