demonstrate function definition inside another one
Functor example