compile function demo