Add example with function pointer