function types example