There are several different sorts of templates, depending on how complex the data are. In addition, you can develop templates based on either the input data types or the output data type.
(define (func my-list)
(cond [(empty? my-list) ...]
[(cons? my-list)
... (first my-list) ...
... (func (rest my-list)) ...]))
(define (func my-list)
(cond [... empty]
[... (cons some-element
(func some-list))]))
(define (func my-list)
(cond [(empty? my-list) empty]
[(cons? my-list)
(cons ( ... (first my-list) ...)
(func (rest my-list)))]))