Naive procedure

A naive procedure is a procedure written directly from the structure of the data it processes, so each part of the data structure becomes a part of the procedure. If a text is a sequence of lines and each line is a sequence of words, a naive procedure for counting words is a loop over lines with a loop over words inside it.

A naive procedure follows only one data structure. When a task involves several, for instance an input and an output organised differently, the naive procedures for each of them are the starting point for merge.