Use closures instead of lambdas.