Create an object with function definition by calling a smart contract funtion

Can I publish an object from a smart contract function from a published package, that can hold a function definition?