Compile with closure.