parameterized closure example