Implement dynamic defination of named functions