static void runPlanWithCheck(PlanInMotion plan, F0 shouldKeepRunning) { while (isTrue(callF(shouldKeepRunning))) { A step = plan.master_next(); if (step == null) ret; callF(step); } }