Custom function compiling