Program planning has been a longstanding and important problem in computing education. Finding useful primitives for planning and assessing whether students are able to understand and use these primitives remain open problems. We make progress on this problem by using higher-order functions (hofs) as planning operations. Not only are hofs increasingly prevalent in computing broadly, some data science programming sources also recommend their use in planning solutions to data-processing pipelines, giving our task additional applicability.
We find students are proficient at recognizing individual hofs through input-output examples. They use a variety of features to identify hofs, with the most prominent features being type-based. While they do have difficulty recognizing compositions of hofs presented in the same input-output example format, there may be simple explanations for this. Either way, students are able to produce correct plans that require composing hofs, and can successfully translate these plans into correct code.