Replaced named function by lambda expression.