updates func keyword to include anonymous functions