A generalized Macdonald operator