core tetra: insert apply primops for partially applied supers and foreign functions