you may need to combine input-based and output-based templates.
Very often, the input-based template gives you clues to the questions
in each clause of a cond, while the output-based template gives
clues to the answers. In this case, you just need to match up
the correct question with the correct answer, and your work is almost
done.
For example, if your function takes in a list and produces another list,
the input template tells you that if
the input is a non-empty list, you'll probably be calling the same function
on the rest of the list, while the output template tells you
that you'll probably be cons-ing some single element onto the
result of calling the same function on somethingorother.
Input template
(define (func my-list)
(cond [(empty? my-list) ...]
[(cons? my-list)
... (first my-list) ...
... (func (rest my-list)) ...]))
Output template
(define (func my-list)
(cond [... empty]
[... (cons some-element
(func some-list))]))
Likely merged template
(define (func my-list)
(cond [(empty? my-list) empty]
[(cons? my-list)
(cons ( ... (first my-list) ...)
(func (rest my-list)))]))