Use a function closure.