Lambda procedure uses smart pointers.