Compile anonymous function