lambda visitor with automatic parameter deduction