added example of updated anonymous function