Integrate prim with funcall generation