compiling a heap example