Make add_compiled_proc and add_built_in take functor