parseInstructionPlanInput
Parses an InstructionPlanInput and returns an InstructionPlan.
This function handles the following input types:
- A single Instruction is wrapped in a SingleInstructionPlan.
- An existing InstructionPlan is returned as-is.
- An array with a single element is unwrapped and parsed recursively.
- An array with multiple elements is wrapped in a divisible SequentialInstructionPlan.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | InstructionPlanInput | The input to parse into an instruction plan. |
Returns
The parsed instruction plan.
Examples
Parsing a single instruction.
Parsing an array of instructions.
Parsing a mixed array with nested plans.
Single-element arrays are unwrapped.